66e62ecddfb327117aa54551a81fbac4c231d00b
[msb/apigateway.git] / redis-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>redis-ext</artifactId>
31     <version>1.3.0-SNAPSHOT</version>
32     <name>onap/msb/apigateway/redis-ext</name>
33     <packaging>pom</packaging>
34
35     <properties>
36       <outputdir>target/assembly</outputdir>
37       <packageid>redis-ext</packageid>
38     </properties>
39
40
41     <profiles>
42       <profile>
43         <id>linux</id>
44         <activation>
45             <activeByDefault>true</activeByDefault>
46         </activation>
47
48         <dependencies>
49             <!--
50             <dependency>
51                <groupId>org.redis.centos.7</groupId>
52                <artifactId>redis</artifactId>
53                <version>${redis.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</id>
67                   <goals>
68                     <goal>unpack</goal>
69                   </goals>
70                   <phase>generate-resources</phase>
71                   <configuration>
72                      <artifactItems>
73                        <artifactItem>
74                          <groupId>org.redis.centos.7</groupId>
75                          <artifactId>redis</artifactId>
76                          <type>tar.gz</type>
77                          <outputDirectory>${linux64outputdir}</outputDirectory>
78                        </artifactItem>
79                      </artifactItems>
80                     <excludes>**/redis-benchmark**,**/*.pdb,**/*.docx</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-redis-dir</id>
96                   <phase>process-resources</phase>
97                   <goals>
98                     <goal>rename</goal>
99                   </goals>
100                   <configuration>
101                     <sourceFile>${linux64outputdir}/redis-${redis.version}</sourceFile>
102                     <destinationFile>${linux64outputdir}/redis</destinationFile>
103                   </configuration>
104                 </execution>
105               </executions>
106             </plugin>
107             -->
108
109             <plugin>
110               <artifactId>maven-resources-plugin</artifactId>
111               <configuration>
112                 <includeEmptyDirs>true</includeEmptyDirs>
113               </configuration>
114               <executions>
115                 <execution>
116                 <id>copy-resources</id>
117                 <phase>process-resources</phase>
118                 <goals>
119                     <goal>copy-resources</goal>
120                 </goals>
121                 <configuration>
122                 <outputDirectory>${linux64outputdir}</outputDirectory>
123                     <resources>
124                         <resource>
125                         <directory>src/assembly/resources/linux</directory>
126                         <filtering>false</filtering>
127                         <includes>
128                             <include>**/*</include>
129                         </includes>
130                         </resource>
131                     </resources>
132                     <overwrite>true</overwrite>
133                 </configuration>
134                 </execution>
135               </executions>
136             </plugin>
137
138             <plugin>
139               <groupId>org.apache.maven.plugins</groupId>
140               <artifactId>maven-antrun-plugin</artifactId>
141               <executions>
142                 <execution>
143                     <id>distribution</id>
144                     <phase>package</phase>
145                     <goals>
146                         <goal>run</goal>
147                     </goals>
148                     <configuration>
149                        <target name="distribution">
150                           <tar destfile="${version.output}/${packageid}-${project.version}-${classifier.linux64}.tar.gz" longfile="posix" compression="gzip">
151                               <tarfileset dir="${linux64outputdir}" filemode="0644" dirmode="0755">
152                                   <exclude name="**/*.sh"/>
153                                   <exclude name="redis/redis-*"/>
154                               </tarfileset>
155                               <tarfileset dir="${linux64outputdir}" filemode="0755" dirmode="0755">
156                                   <include name="**/*.sh"/>
157                                   <include name="redis/redis-*"/>
158                               </tarfileset>
159                           </tar>
160                           <attachartifact file="${version.output}/${packageid}-${project.version}-${classifier.linux64}.tar.gz" classifier="${classifier.linux64}" type="tar.gz"/>
161                       </target>
162                     </configuration>
163                 </execution>
164               </executions>
165             </plugin>
166
167           </plugins>
168         </build>
169       </profile>
170     </profiles>
171 </project>