msb protocol synch change
[msb/apigateway.git] / msb-core / openresty-ext / 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/xsd/maven-4.0.0.xsd">
23     <parent>
24         <groupId>org.openo.common-services.microservice-bus</groupId>
25         <artifactId>msb-core-parent</artifactId>
26         <version>1.1.0-SNAPSHOT</version>
27     </parent>
28
29
30     <modelVersion>4.0.0</modelVersion>
31     <artifactId>openresty-ext</artifactId>
32     <version>1.1.0-SNAPSHOT</version>
33     <name>common-services-microservice-bus/msb-core/openresty-ext</name>
34     <packaging>pom</packaging>
35
36     <properties>
37       <outputdir>target/assembly</outputdir>
38       <packageid>openresty-ext</packageid>
39     </properties>
40
41   <dependencies>
42     <dependency>
43           <groupId>org.openresty.centos.6</groupId>
44           <artifactId>openresty</artifactId>
45           <version>${openresty.version}</version>
46           <type>tar.gz</type>
47         </dependency>
48     </dependencies>
49
50     <build>
51     <plugins>
52             <plugin>
53               <groupId>org.apache.maven.plugins</groupId>
54               <artifactId>maven-dependency-plugin</artifactId>
55               <executions>      
56                 <execution>
57                   <id>unpack-dependency-file-linux</id>
58                   <goals>
59                     <goal>unpack</goal>
60                   </goals>
61                   <!--解压顺序,在最前面-->
62                   <phase>generate-resources</phase>
63                   <configuration>
64                     <artifactItems>   
65                       <artifactItem>
66                         <groupId>org.openresty.centos.6</groupId>
67                         <artifactId>openresty</artifactId>
68                         <type>tar.gz</type>
69                         <outputDirectory>${linux64outputdir}</outputDirectory>         
70                       </artifactItem>
71                     </artifactItems>
72                     <excludes>**/pod/**,**/*.pdb</excludes>
73                     <overWriteReleases>false</overWriteReleases>
74                     <overWriteSnapshots>true</overWriteSnapshots>
75                     <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
76                   </configuration>
77                 </execution>          
78               </executions>
79             </plugin> 
80
81             <plugin>
82               <groupId>com.coderplus.maven.plugins</groupId>
83               <artifactId>copy-rename-maven-plugin</artifactId>
84               <version>1.0.1</version>
85               <executions>          
86                 <execution>
87                   <id>rename-nginx-dir</id>
88                   <phase>process-resources</phase>
89                   <goals>
90                     <goal>rename</goal>
91                   </goals>
92                   <configuration>
93                     <sourceFile>${linux64outputdir}/openresty-${openresty.version}</sourceFile>
94                     <destinationFile>${linux64outputdir}/openresty</destinationFile>
95                   </configuration>
96                 </execution>
97               </executions>
98             </plugin>    
99
100             <plugin>
101               <artifactId>maven-resources-plugin</artifactId>
102               <executions>
103                 <execution>
104                   <id>copy-msb-resources-linux64</id>                 
105                   <phase>process-resources</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/resources/</directory>
115                         <filtering>false</filtering>
116                         <includes>
117                           <include>**/*</include>
118                         </includes>
119                         <excludes>
120                           <exclude>**/*.bat</exclude>
121                           <exclude>**/openrestyService*</exclude>
122                         </excludes>
123                       </resource>  
124                     </resources>
125                     <overwrite>true</overwrite>
126                   </configuration>
127                 </execution>
128               </executions>
129             </plugin>
130           
131
132             <plugin>
133               <groupId>org.apache.maven.plugins</groupId>
134               <artifactId>maven-antrun-plugin</artifactId>
135               <executions>
136                 <execution>
137                     <id>distribution-linux</id>
138                     <phase>package</phase>
139                     <goals>
140                         <goal>run</goal>
141                     </goals>
142                     <configuration>
143                         <target name="distribution">
144                             <tar destfile="${version.output}/${packageid}-${project.version}-${classifier.linux64}.tar.gz" longfile="posix" compression="gzip">
145                                 <tarfileset dir="${linux64outputdir}" filemode="0644" dirmode="0755">
146                                     <exclude name="**/*.sh"/>
147                                     <exclude name="openresty/nginx/sbin/nginx"/>                  
148                                 </tarfileset>
149                                 <tarfileset dir="${linux64outputdir}" filemode="0755" dirmode="0755">
150                                     <include name="**/*.sh"/>
151                                     <include name="openresty/nginx/sbin/nginx"/>                  
152                                 </tarfileset>
153                             </tar>
154                             <attachartifact file="${version.output}/${packageid}-${project.version}-${classifier.linux64}.tar.gz" classifier="${classifier.linux64}" type="tar.gz"/>
155                         </target>
156                     </configuration>
157                 </execution>
158               </executions>
159             </plugin>
160
161     </plugins>
162     </build>
163
164
165 </project>