Release vnfsdk/refrepo
[vnfsdk/refrepo.git] / vnfmarket-be / deployment / zip / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   Copyright (c) 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.vnfsdk.refrepo</groupId>
21         <artifactId>vnfmarket-deployment</artifactId>
22         <version>1.5.0</version>
23     </parent>
24
25     <artifactId>vnf-sdk-marketplace-deployment</artifactId>
26     <name>vnf-sdk-marketplace/deployment</name>
27     <packaging>pom</packaging>
28
29     <properties>
30         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
31     </properties>
32
33     <build>
34         <pluginManagement>
35             <plugins>
36                 <plugin>
37                     <groupId>org.codehaus.gmaven</groupId>
38                     <artifactId>groovy-maven-plugin</artifactId>
39                     <version>2.0</version>
40                 </plugin>
41             </plugins>
42         </pluginManagement>
43         <plugins>
44             <plugin>
45                 <groupId>org.codehaus.gmaven</groupId>
46                 <artifactId>gmaven-plugin</artifactId>
47                 <version>1.5</version>
48                 <executions>
49                     <execution>
50                         <id>VnfSdkMarketplace package</id>
51                         <phase>package</phase>
52                         <goals>
53                             <goal>execute</goal>
54                         </goals>
55                         <configuration>
56                             <source>
57                                 System.out.println("******** Going to make release zip ********")
58
59                                 deployFolder = "${project.build.directory}/deployoutput"
60                                 deployUnzip = "${project.build.directory}/deployunzip"
61                                 outfileName = "VnfSdkMarketplace-${project.version}.zip"
62
63                                 ant.delete(dir: "${deployFolder}")
64                                 ant.mkdir(dir: "${deployFolder}")
65
66                                 ant.delete(dir: "${deployUnzip}")
67                                 ant.mkdir(dir: "${deployUnzip}")
68
69                                 ant.mkdir(dir: "${deployUnzip}/webapps/ROOT")
70                                 ant.mkdir(dir: "${deployUnzip}/webapps/onapui")
71                                 ant.mkdir(dir: "${deployUnzip}/webapps/apidocs")
72
73                                 ant.copy(todir: "${deployUnzip}") {
74                                 fileset(dir: "${basedir}/src/main/release"){
75                                 exclude(name: "**/.gitignore")
76                                 }
77                                 }
78
79                                 ant.copy(todir: "${deployUnzip}/webapps/ROOT") {
80                                 fileset(dir: "${project.build.directory}/../../../vnf-sdk-marketplace/target/ROOT")
81                                 }
82
83                                 ant.copy(todir: "${deployUnzip}/webapps/onapui") {
84                                 fileset(dir: "${project.build.directory}/../../../../vnfmarket/src/main/webapp")
85                                 }
86
87                                 ant.copy(todir: "${deployUnzip}/webapps/apidocs") {
88                                 fileset(dir: "${project.build.directory}/../../../vnf-sdk-marketplace/target/swagger-ui-master/dist") {
89                                 exclude(name: "index.html")
90                                 }
91                                 fileset(dir: "${project.build.directory}/../../../vnf-sdk-marketplace/src/main/webapp/apidocs")
92                                 }
93
94                                 ant.zip(destfile: "${deployFolder}/${outfileName}") {
95                                 fileset(dir: "${deployUnzip}")
96                                 }
97                                 System.out.println("******** completed. ************")
98                             </source>
99                         </configuration>
100                     </execution>
101                 </executions>
102             </plugin>
103              <plugin>
104                 <groupId>org.codehaus.mojo</groupId>
105                 <artifactId>build-helper-maven-plugin</artifactId>
106                 <executions>
107                     <execution>
108                         <id>attach-artifacts</id>
109                         <phase>package</phase>
110                         <goals>
111                             <goal>attach-artifact</goal>
112                         </goals>
113                         <configuration>
114                             <artifacts>
115                                 <artifact>
116                                     <file>${project.build.directory}/deployoutput/VnfSdkMarketplace-${project.version}.zip</file>
117                                     <type>zip</type>
118                                 </artifact>
119                             </artifacts>
120                         </configuration>
121                     </execution>
122                 </executions>
123             </plugin>
124         </plugins>
125     </build>
126 </project>