msb protocol synch change
[msb/apigateway.git] / msb-core / distributions / standalone / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4     Copyright 2016 ZTE Corporation.
5
6     Licensed under the Apache License, Version 2.0 (the "License");
7     you may not use this file except in compliance with the License.
8     You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS,
14     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15     See the License for the specific language governing permissions and
16     limitations under the License.
17
18         Author: Zhaoxing Meng
19         email: meng.zhaoxing1@zte.com.cn
20
21 -->
22 <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/maven-v4_0_0.xsd">
23     <parent>
24         <groupId>org.openo.common-services.microservice-bus</groupId>
25         <artifactId>distributions-parent</artifactId>
26         <version>1.1.0-SNAPSHOT</version>
27     </parent>
28     <modelVersion>4.0.0</modelVersion>
29     <artifactId>msb-core-standalone</artifactId>
30     <name>common-services-microservice-bus/msb-core/distributions/standalone</name>
31     <packaging>pom</packaging>
32     <version>1.1.0-SNAPSHOT</version>
33
34     <properties>
35       <packageid>msb-standalone</packageid>
36       <linux64id>linux64</linux64id>
37       <win64id>win64</win64id>
38       <linux64outputdir>target/assembly/${linux64id}</linux64outputdir>
39       <win64outputdir>target/assembly/${win64id}</win64outputdir>
40     </properties>
41
42         <dependencies>
43     <dependency>
44       <groupId>org.openo.common-services.microservice-bus</groupId>
45       <artifactId>apiroute-standalone</artifactId>
46       <version>${project.version}</version>
47       <type>zip</type>
48       <optional>true</optional>
49     </dependency>
50     <dependency>
51         <groupId>org.openo.common-services.microservice-bus</groupId>
52         <artifactId>redis-ext</artifactId>
53         <type>tar.gz</type>
54         <classifier>linux64</classifier>
55         <version>${project.version}</version>
56         <optional>true</optional>
57     </dependency>
58     <dependency>
59         <groupId>org.openo.common-services.microservice-bus</groupId>
60         <artifactId>openresty-ext</artifactId>
61         <type>tar.gz</type>
62         <classifier>linux64</classifier>
63         <version>${project.version}</version>
64         <optional>true</optional>
65     </dependency>
66     <dependency>
67         <groupId>org.openo.common-services.microservice-bus</groupId>
68         <artifactId>eag-openresty-ext</artifactId>
69         <type>zip</type>
70         <version>${project.version}</version>
71         <optional>true</optional>
72     </dependency>
73
74
75   </dependencies>
76         <build>
77
78         <plugins>
79     <plugin>
80       <artifactId>maven-resources-plugin</artifactId>
81       <executions>
82         <execution>
83             <id>copy-resources-dockerfile</id>
84             <phase>prepare-package</phase>
85             <goals>
86               <goal>copy-resources</goal>
87             </goals>
88             <configuration>
89               <outputDirectory>${version.output}</outputDirectory>
90               <includeEmptyDirs>true</includeEmptyDirs>
91               <resources>
92                 <resource>
93                   <directory>${dockerFileDir}</directory>
94                   <filtering>false</filtering>
95                   <includes>
96                     <include>**/*</include>
97                   </includes>
98                 </resource>
99               </resources>
100               <overwrite>true</overwrite>
101             </configuration>
102         </execution>
103         <execution>
104           <id>copy-msb-resources-${linux64id}</id>
105           <phase>prepare-package</phase>
106           <goals>
107             <goal>copy-resources</goal>
108           </goals>
109           <configuration>
110             <outputDirectory>${linux64outputdir}</outputDirectory>
111                       <includeEmptyDirs>true</includeEmptyDirs>
112             <resources>
113               <resource>
114                 <directory>src/assembly/resource/</directory>
115                 <filtering>false</filtering>
116                 <includes>
117                   <include>**/*</include>
118                 </includes>
119                 <excludes>
120                   <exclude>**/*.bat</exclude>
121                 </excludes>
122               </resource>
123             </resources>
124             <overwrite>true</overwrite>
125           </configuration>
126         </execution>
127       </executions>
128     </plugin>
129
130     <plugin>
131       <groupId>org.apache.maven.plugins</groupId>
132       <artifactId>maven-dependency-plugin</artifactId>
133       <executions>
134         <execution>
135             <id>unpacktolinux64</id>
136             <goals>
137                 <goal>unpack</goal>
138             </goals>
139             <phase>prepare-package</phase>
140             <configuration>
141               <artifactItems>
142                   <artifactItem>
143                     <groupId>org.openo.common-services.microservice-bus</groupId>
144                     <artifactId>apiroute-standalone</artifactId>
145                     <type>zip</type>
146                   </artifactItem>
147                   <artifactItem>
148                     <groupId>org.openo.common-services.microservice-bus</groupId>
149                     <artifactId>redis-ext</artifactId>
150                     <type>tar.gz</type>
151                     <classifier>linux64</classifier>
152                   </artifactItem>
153                   <artifactItem>
154                     <groupId>org.openo.common-services.microservice-bus</groupId>
155                     <artifactId>openresty-ext</artifactId>
156                     <type>tar.gz</type>
157                     <classifier>linux64</classifier>
158                   </artifactItem>
159               </artifactItems>
160               <excludes>**/*.bat,*.cmd</excludes>
161               <outputDirectory>${linux64outputdir}</outputDirectory>
162               <overWriteReleases>false</overWriteReleases>
163               <overWriteSnapshots>true</overWriteSnapshots>
164               <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
165             </configuration>
166         </execution>
167
168         <execution>
169             <id>eag-unpacktolinux64</id>
170             <goals>
171                 <goal>unpack</goal>
172             </goals>
173             <phase>prepare-package</phase>
174             <configuration>
175               <artifactItems>
176                  <artifactItem>
177                     <groupId>org.openo.common-services.microservice-bus</groupId>
178                     <artifactId>openresty-ext</artifactId>
179                     <type>tar.gz</type>
180                     <classifier>linux64</classifier>
181                   </artifactItem>
182                   <artifactItem>
183                     <groupId>org.openo.common-services.microservice-bus</groupId>
184                     <artifactId>eag-openresty-ext</artifactId>
185                     <type>zip</type>
186                   </artifactItem>
187               </artifactItems>
188               <excludes>**/*.bat,*.cmd</excludes>
189               <outputDirectory>${linux64outputdir}/eag</outputDirectory>
190               <overWriteReleases>false</overWriteReleases>
191               <overWriteSnapshots>true</overWriteSnapshots>
192               <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
193             </configuration>
194         </execution>
195       </executions>
196     </plugin>
197
198     <plugin>
199       <groupId>org.apache.maven.plugins</groupId>
200       <artifactId>maven-antrun-plugin</artifactId>
201       <executions>
202
203         <execution>
204           <id>prepare-eag-openresty-linux</id>
205           <phase>prepare-package</phase>
206           <goals>
207             <goal>run</goal>
208           </goals>
209           <configuration>
210             <target>
211               <copy todir="${linux64outputdir}/eag/">
212                 <fileset dir="${linux64outputdir}/eag/openresty"/>
213               </copy>
214               <delete dir="${linux64outputdir}/eag/openresty" includeemptydirs="true"/>
215             </target>          
216           </configuration>
217         </execution>
218
219         <execution>
220             <id>distribution</id>
221             <phase>package</phase>
222             <goals>
223                 <goal>run</goal>
224             </goals>
225             <configuration>
226                 <target name="distribution">
227                     <tar destfile="${version.output}/${packageid}-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip">
228                         <tarfileset dir="target/assembly/linux64" filemode="0644" dirmode="0755">
229                             <exclude name="**/*.sh"/>
230                             <exclude name="openresty/nginx/sbin/nginx"/>
231                             <exclude name="eag/nginx/sbin/nginx"/>
232                             <exclude name="redis/redis-*"/>
233                         </tarfileset>
234                         <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755">
235                             <include name="**/*.sh"/>
236                             <include name="openresty/nginx/sbin/nginx"/>
237                             <include name="eag/nginx/sbin/nginx"/>
238                             <include name="redis/redis-*"/>
239                         </tarfileset>
240                     </tar>
241                     <attachartifact file="${version.output}/${packageid}-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/>
242                 </target>
243             </configuration>
244         </execution>
245       </executions>
246     </plugin>
247         </plugins>
248         </build>
249
250 </project>