eb8352732df5afe81319b74af26cc44229e0a3f3
[msb/apigateway.git] / openresty-ext / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  
4     Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
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 -->
19
20 <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">
21     <parent>
22         <groupId>org.onap.msb.apigateway</groupId>
23         <artifactId>msb-apigateway-parent</artifactId>
24         <version>1.3.0-SNAPSHOT</version>
25     </parent>
26
27
28     <modelVersion>4.0.0</modelVersion>
29     <groupId>org.onap.msb.apigateway</groupId>
30     <artifactId>openresty-ext</artifactId>
31     <version>1.3.0-SNAPSHOT</version>
32     <name>onap/msb/apigateway/openresty-ext</name>
33     <packaging>pom</packaging>
34
35     <properties>
36       <outputdir>target/assembly</outputdir>
37       <packageid>openresty-ext</packageid>
38       <sdk-packageid>openresty-ext-sdk</sdk-packageid>
39     </properties>
40
41
42     <profiles>
43       <profile>
44         <id>linux</id>
45         <activation>
46             <activeByDefault>true</activeByDefault>
47         </activation>
48      <dependencies>
49        <!--
50        <dependency>
51              <groupId>org.openresty.centos.6</groupId>
52              <artifactId>openresty</artifactId>
53              <version>${openresty.version}</version>
54              <type>tar.gz</type>
55            </dependency>
56        -->
57        </dependencies>
58         <build>
59           <plugins> 
60             <!-- 
61             <plugin>
62               <groupId>org.apache.maven.plugins</groupId>
63               <artifactId>maven-dependency-plugin</artifactId>
64               <executions>      
65                 <execution>
66                   <id>unpack-dependency-file-linux</id>
67                   <goals>
68                     <goal>unpack</goal>
69                   </goals>
70                   <phase>generate-resources</phase>
71                   <configuration>
72                     <artifactItems>   
73                       <artifactItem>
74                                             <groupId>org.openresty.centos.6</groupId>
75                         <artifactId>openresty</artifactId>
76                         <type>tar.gz</type>
77                         <outputDirectory>${linux64outputdir}</outputDirectory>         
78                       </artifactItem>        
79                     </artifactItems>
80                     <excludes>**/pod/**,**/*.pdb</excludes>
81                     <overWriteReleases>false</overWriteReleases>
82                     <overWriteSnapshots>true</overWriteSnapshots>
83                     <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
84                   </configuration>
85                 </execution>          
86               </executions>
87             </plugin> 
88
89             <plugin>
90               <groupId>com.coderplus.maven.plugins</groupId>
91               <artifactId>copy-rename-maven-plugin</artifactId>
92               <version>1.0.1</version>
93               <executions>          
94                 <execution>
95                   <id>rename-nginx-dir</id>
96                   <phase>process-resources</phase>
97                   <goals>
98                     <goal>rename</goal>
99                   </goals>
100                   <configuration>
101                     <sourceFile>${linux64outputdir}/openresty-${openresty.version}</sourceFile>
102                     <destinationFile>${linux64outputdir}/openresty</destinationFile>
103                   </configuration>
104                 </execution>
105               </executions>
106             </plugin>    
107             -->
108             
109             <plugin>
110               <artifactId>maven-resources-plugin</artifactId>
111               <executions>
112                 <execution>
113                   <id>copy-msb-resources-linux64</id>                 
114                   <phase>process-resources</phase>
115                   <goals>
116                     <goal>copy-resources</goal>
117                   </goals>
118                   <configuration>
119                     <outputDirectory>${linux64outputdir}</outputDirectory>
120                     <includeEmptyDirs>true</includeEmptyDirs>
121                     <resources>     
122                       <resource>
123                         <directory>src/assembly/resources/</directory>
124                         <filtering>false</filtering>
125                         <includes>
126                           <include>**/*</include>
127                         </includes>
128                         <excludes>
129                           <exclude>**/*.bat</exclude>
130                           <exclude>**/openrestyService*</exclude>
131                         </excludes>
132                       </resource>  
133                     </resources>
134                     <overwrite>true</overwrite>
135                   </configuration>
136                 </execution>
137               </executions>
138             </plugin>
139           
140
141             <plugin>
142               <groupId>org.apache.maven.plugins</groupId>
143               <artifactId>maven-antrun-plugin</artifactId>
144               <executions>
145                 <execution>
146                     <id>distribution-linux</id>
147                     <phase>package</phase>
148                     <goals>
149                         <goal>run</goal>
150                     </goals>
151                     <configuration>
152                         <target name="distribution">
153                             <tar destfile="${version.output}/${packageid}-${project.version}-${classifier.linux64}.tar.gz" longfile="posix" compression="gzip">
154                                 <tarfileset dir="${linux64outputdir}" filemode="0644" dirmode="0755">
155                                     <exclude name="**/*.sh"/>
156                                     <exclude name="openresty/nginx/sbin/nginx"/>                  
157                                 </tarfileset>
158                                 <tarfileset dir="${linux64outputdir}" filemode="0755" dirmode="0755">
159                                     <include name="**/*.sh"/>
160                                     <include name="openresty/nginx/sbin/nginx"/>                  
161                                 </tarfileset>
162                             </tar>
163                             <attachartifact file="${version.output}/${packageid}-${project.version}-${classifier.linux64}.tar.gz" classifier="${classifier.linux64}" type="tar.gz"/>
164                             <tar destfile="${version.output}/${sdk-packageid}-${project.version}.tar.gz" longfile="posix" compression="gzip">
165                             <tarfileset dir="src/assembly/resources/openresty/nginx/luaext" filemode="0644" dirmode="0755">                
166                             </tarfileset>
167                             </tar>
168                         </target>
169                     </configuration>
170                 </execution>
171               </executions>
172             </plugin>
173
174           </plugins>
175         </build>
176       </profile>
177
178     </profiles>
179
180
181     
182      
183
184 </project>