fix bug for vfc-nfvo-driver-vnfm-svnfm sanity check
[vfc/nfvo/driver/vnfm/svnfm.git] / huawei / vnfmadapter / VnfmadapterService / deployment / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     Copyright (c) 2016-2017, Huawei Technologies Co., Ltd.
4
5     Licensed under the Apache License, Version 2.0 (the "License");
6     you may not use this file except in compliance with the License.
7     You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16  -->
17 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
18     <modelVersion>4.0.0</modelVersion>
19     <parent>
20         <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei.vnfmadapter</groupId>
21         <artifactId>vnfmadapter-service-root</artifactId>
22         <version>1.3.4-SNAPSHOT</version>
23     </parent>
24
25     <artifactId>hw-vnfmadapter-deployment</artifactId>
26     <packaging>pom</packaging>
27
28     <properties>
29         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
30     </properties>
31
32     <build>
33         <plugins>
34             <plugin>
35                 <groupId>org.codehaus.gmaven</groupId>
36                 <artifactId>gmaven-plugin</artifactId>
37                 <version>1.5</version>
38                 <executions>
39                     <execution>
40                         <id>vnfmadapter package</id>
41                         <phase>package</phase>
42                         <goals>
43                             <goal>execute</goal>
44                         </goals>
45                         <configuration>
46                             <source>
47                                 System.out.println("******** Going to make release zip ********")
48
49                                 deployFolder =
50                                 "${project.build.directory}/deployoutput"
51                                 deployUnzip =
52                                 "${project.build.directory}/deployunzip"
53                                 outfileName =
54                                 "${package.name}-${project.version}.zip"
55                                 ant.delete(dir: "${deployFolder}")
56                                 ant.mkdir(dir:
57                                 "${deployFolder}")
58
59                                 ant.delete(dir: "${deployUnzip}")
60                                 ant.mkdir(dir: "${deployUnzip}")
61
62                                 ant.mkdir(dir:
63                                 "${deployUnzip}/webapps/")
64                                 ant.mkdir(dir: "${deployUnzip}/webapps/ROOT")
65                                 ant.mkdir(dir:
66                                 "${deployUnzip}/logs")
67
68                                 ant.copy(todir: "${deployUnzip}") {
69                                 fileset(dir: "${basedir}/src/main/release"){
70                                 exclude(name: "**/.gitignore")
71                                 }
72                                 }
73                                 ant.copy(todir: "${deployUnzip}/docker") {
74                                 fileset(dir: "${basedir}/../docker"){
75                                 exclude(name: "**/.gitignore")
76                                 }
77                                 }
78                                 ant.copy(todir:
79                                 "${deployUnzip}/webapps/ROOT") {
80                                 fileset(dir:
81                                 "${project.build.directory}/../../service/target/${package.name}-${project.version}")
82                                 }
83
84                                 ant.zip(destfile:
85                                 "${deployFolder}/${outfileName}") {
86                                 fileset(dir: "${deployUnzip}")
87                                 }
88                                 System.out.println("******** completed. ************")
89                             </source>
90                         </configuration>
91                     </execution>
92                 </executions>
93             </plugin>
94
95             <plugin>
96                 <groupId>org.codehaus.mojo</groupId>
97                 <artifactId>build-helper-maven-plugin</artifactId>
98                 <executions>
99                     <execution>
100                         <id>attach-artifacts</id>
101                         <phase>package</phase>
102                         <goals>
103                             <goal>attach-artifact</goal>
104                         </goals>
105                         <configuration>
106                             <artifacts>
107                                 <artifact>
108                                     <file>${project.build.directory}/deployoutput/${package.name}-${project.version}.zip</file>
109                                     <type>zip</type>
110                                 </artifact>
111                             </artifacts>
112                         </configuration>
113                     </execution>
114                 </executions>
115             </plugin>
116
117
118
119         </plugins>
120     </build>
121 <name>vfc/nfvo/drivers/vnfm/svnfm/huawei/vnfmadapter/VnfmadapterService/deployment</name></project>