fix bug for vfc-nfvo-driver-vnfm-svnfm sanity check
[vfc/nfvo/driver/vnfm/svnfm.git] / nokia / vnfmdriver / vfcadaptorservice / deployment / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     Copyright (c) 2016, Nokia Corporation.
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>vfcadaptor-service</artifactId>
22         <version>1.3.4-SNAPSHOT</version>
23     </parent>
24
25     <artifactId>vfcadaptor-deployment</artifactId>
26     <packaging>pom</packaging>
27     
28     <name>vfc/nfvo/driver/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice/deployment</name>
29     <description>svnfm vnfm driver deployment</description>
30
31     <properties>
32         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33     </properties>
34
35     <build>
36         <plugins>
37             <plugin>
38                 <groupId>org.codehaus.gmaven</groupId>
39                 <artifactId>gmaven-plugin</artifactId>
40                 <version>1.5</version>
41                 <executions>
42                     <execution>
43                         <id>vfcadaptor package</id>
44                         <phase>package</phase>
45                         <goals>
46                             <goal>execute</goal>
47                         </goals>
48                         <configuration>
49                             <source>
50                                 System.out.println("******** Going to make release zip ********")
51
52                                 deployFolder =
53                                 "${project.build.directory}/deployoutput"
54                                 deployUnzip =
55                                 "${project.build.directory}/deployunzip"
56                                 outfileName =
57                                 "${package.name}-${project.version}.zip"
58                                 ant.delete(dir: "${deployFolder}")
59                                 ant.mkdir(dir:
60                                 "${deployFolder}")
61
62                                 ant.delete(dir: "${deployUnzip}")
63                                 ant.mkdir(dir: "${deployUnzip}")
64
65                                 ant.mkdir(dir:
66                                 "${deployUnzip}/webapps/")
67                                 ant.mkdir(dir: "${deployUnzip}/webapps/ROOT")
68                                 ant.mkdir(dir:
69                                 "${deployUnzip}/logs")
70                                 
71                                 System.out.println("******** start copying from ${basedir}/src/main/release to ${deployUnzip}. ************")
72
73                                 ant.copy(todir: "${deployUnzip}") {
74                                 fileset(dir: "${basedir}/src/main/release"){
75                                 exclude(name: "**/.gitignore")
76                                 }
77                                 }
78                                 ant.copy(todir: "${deployUnzip}/docker") {
79                                 fileset(dir: "${basedir}/../docker"){
80                                 exclude(name: "**/.gitignore")
81                                 }
82                                 }
83                                 
84                                 System.out.println("******** start copying from ${project.build.directory}/../../vfcadaptor/target/${package.name}-${project.version} to ${deployUnzip}/webapps/ROOT. ************")
85                                 ant.copy(todir:
86                                 "${deployUnzip}/webapps/ROOT") {
87                                 fileset(dir:
88                                 "${project.build.directory}/../../vfcadaptor/target/${package.name}-${project.version}")
89                                 }
90
91                                 System.out.println("******** start zipping from ${deployUnzip} to ${deployFolder}/${outfileName}. ************")
92                                 ant.zip(destfile:
93                                 "${deployFolder}/${outfileName}") {
94                                 fileset(dir: "${deployUnzip}")
95                                 }
96                                 System.out.println("******** completed. ************")
97                             </source>
98                         </configuration>
99                     </execution>
100                 </executions>
101             </plugin>
102
103             <plugin>
104                 <groupId>org.codehaus.mojo</groupId>
105                 <artifactId>build-helper-maven-plugin</artifactId>
106                 <version>3.0.0</version>
107                 <executions>
108                     <execution>
109                         <id>attach-artifacts</id>
110                         <phase>package</phase>
111                         <goals>
112                             <goal>attach-artifact</goal>
113                         </goals>
114                         <configuration>
115                             <artifacts>
116                                 <artifact>
117                                     <file>${project.build.directory}/deployoutput/${package.name}-${project.version}.zip</file>
118                                     <type>zip</type>
119                                 </artifact>
120                             </artifacts>
121                         </configuration>
122                     </execution>
123                 </executions>
124             </plugin>
125
126
127
128         </plugins>
129     </build>
130 </project>