e3ab0cfd4ca243a2a30adfb568a42d5895eef52b
[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, 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</groupId>
21         <artifactId>vnfmadapter-service-root</artifactId>
22         <version>1.0.0-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:
74                                 "${deployUnzip}/webapps/ROOT") {
75                                 fileset(dir:
76                                 "${project.build.directory}/../../service/target/${package.name}-${project.version}")
77                                 }
78
79                                 ant.zip(destfile:
80                                 "${deployFolder}/${outfileName}") {
81                                 fileset(dir: "${deployUnzip}")
82                                 }
83                                 System.out.println("******** completed. ************")
84                             </source>
85                         </configuration>
86                     </execution>
87                 </executions>
88             </plugin>
89
90             <plugin>
91                 <groupId>org.codehaus.mojo</groupId>
92                 <artifactId>build-helper-maven-plugin</artifactId>
93                 <executions>
94                     <execution>
95                         <id>attach-artifacts</id>
96                         <phase>package</phase>
97                         <goals>
98                             <goal>attach-artifact</goal>
99                         </goals>
100                         <configuration>
101                             <artifacts>
102                                 <artifact>
103                                     <file>${project.build.directory}/deployoutput/${package.name}-${project.version}.zip</file>
104                                     <type>zip</type>
105                                 </artifact>
106                             </artifacts>
107                         </configuration>
108                     </execution>
109                 </executions>
110             </plugin>
111
112
113
114         </plugins>
115     </build>
116 <name>vfc/nfvo/drivers/vnfm/svnfm/huawei/vnfmadapter/VnfmadapterService/deployment</name></project>