Release version 2.1.2 dockers and roll version
[sdnc/oam.git] / installation / dmaap-listener / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3     <modelVersion>4.0.0</modelVersion>
4
5     <parent>
6         <groupId>org.onap.sdnc.oam</groupId>
7         <artifactId>installation</artifactId>
8         <version>2.1.3-SNAPSHOT</version>
9     </parent>
10
11     <groupId>org.onap.sdnc.oam</groupId>
12     <artifactId>installation-dmaap-listener</artifactId>
13     <version>2.1.3-SNAPSHOT</version>
14     <packaging>pom</packaging>
15
16     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17     <description>Creates dmaap-listener Docker container</description>
18     <organization>
19         <name>ONAP</name>
20     </organization>
21
22     <properties>
23         <image.name>onap/sdnc-dmaap-listener-image</image.name>
24         <sdnc.project.version>${project.version}</sdnc.project.version>
25         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
26         <ccsdk.docker.version>1.1.1</ccsdk.docker.version>
27         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
28         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
29     </properties>
30
31     <build>
32         <plugins>
33
34
35             <plugin>
36                 <groupId>org.codehaus.groovy.maven</groupId>
37                 <artifactId>gmaven-plugin</artifactId>
38                 <executions>
39                     <execution>
40                         <phase>validate</phase>
41                         <goals>
42                             <goal>execute</goal>
43                         </goals>
44                         <configuration>
45                             <source>${basedir}/../TagVersion.groovy</source>
46                         </configuration>
47                     </execution>
48                 </executions>
49             </plugin>
50
51
52
53             <plugin>
54                 <artifactId>maven-resources-plugin</artifactId>
55                 <version>2.6</version>
56                 <executions>
57                     <execution>
58                         <id>copy-dockerfile</id>
59                         <goals>
60                             <goal>copy-resources</goal>
61                         </goals><!-- here the phase you need -->
62                         <phase>validate</phase>
63                         <configuration>
64                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
65                             <resources>
66                                 <resource>
67                                     <directory>src/main/docker</directory>
68                                     <includes>
69                                         <include>Dockerfile</include>
70                                     </includes>
71                                     <filtering>true</filtering>
72                                 </resource>
73                             </resources>
74                         </configuration>
75                     </execution>
76
77                     <execution>
78                         <id>copy-scripts</id>
79                         <goals>
80                             <goal>copy-resources</goal>
81                         </goals><!-- here the phase you need -->
82                         <phase>validate</phase>
83                         <configuration>
84                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/dmaap-listener/bin</outputDirectory>
85                             <resources>
86                                 <resource>
87                                     <directory>src/main/scripts</directory>
88                                     <includes>
89                                         <include>*.sh</include>
90                                     </includes>
91                                     <filtering>false</filtering>
92                                 </resource>
93                             </resources>
94                         </configuration>
95                     </execution>
96
97                     <execution>
98                         <id>copy-properties</id>
99                         <goals>
100                             <goal>copy-resources</goal>
101                         </goals><!-- here the phase you need -->
102                         <phase>validate</phase>
103                         <configuration>
104                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
105                             <resources>
106                                 <resource>
107                                     <directory>src/main/properties</directory>
108                                     <includes>
109                                         <include>*</include>
110                                     </includes>
111                                     <filtering>false</filtering>
112                                 </resource>
113                             </resources>
114                         </configuration>
115                     </execution>
116
117                 </executions>
118             </plugin>
119             <plugin>
120                 <groupId>org.apache.maven.plugins</groupId>
121                 <artifactId>maven-dependency-plugin</artifactId>
122                 <executions>
123                     <execution>
124                         <id>unpack</id>
125                         <goals>
126                             <goal>unpack</goal>
127                         </goals>
128                         <phase>initialize</phase>
129                         <configuration>
130                             <artifactItems>
131                                 <artifactItem>
132                                     <groupId>org.onap.ccsdk.sli.northbound</groupId>
133                                     <artifactId>dmaap-listener</artifactId>
134                                     <type>zip</type>
135                                     <version>${ccsdk.sli.northbound.version}</version>
136                                 </artifactItem>
137                             </artifactItems>
138                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/dmaap-listener</outputDirectory>
139                             <excludes>bin/**,**/*-javadoc.jar,**/*-sources.jar</excludes>
140                             <overWriteReleases>true</overWriteReleases>
141                             <overWriteSnapshots>true</overWriteSnapshots>
142                         </configuration>
143                     </execution>
144                 </executions>
145             </plugin>
146
147             <plugin>
148                 <groupId>org.codehaus.mojo</groupId>
149                 <artifactId>exec-maven-plugin</artifactId>
150                 <version>1.5.0</version>
151                 <executions>
152
153
154
155                     <execution>
156                         <id>change shell permissions</id>
157                         <phase>process-sources</phase>
158                         <goals>
159                             <goal>exec</goal>
160                         </goals>
161                         <configuration>
162                             <executable>/usr/bin/find</executable>
163                             <arguments>
164                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
165                                 <argument>-name</argument>
166                                 <argument>*.sh</argument>
167                                 <argument>-exec</argument>
168                                 <argument>chmod</argument>
169                                 <argument>+x</argument>
170                                 <argument>{}</argument>
171                                 <argument>;</argument>
172                             </arguments>
173                         </configuration>
174                     </execution>
175                 </executions>
176             </plugin>
177         </plugins>
178     </build>
179
180     <profiles>
181         <profile>
182             <id>docker</id>
183             <build>
184                 <plugins>
185                     <plugin>
186                         <groupId>io.fabric8</groupId>
187                         <artifactId>docker-maven-plugin</artifactId>
188                         <version>0.28.0</version>
189                         <inherited>false</inherited>
190                         <configuration>
191                             <images>
192                                 <image>
193                                     <name>${image.name}</name>
194                                     <build>
195                                         <cleanup>try</cleanup>
196                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
197                                         <dockerFile>Dockerfile</dockerFile>
198                                         <tags>
199                                             <tag>${project.docker.latestminortag.version}</tag>
200                                             <tag>${project.docker.latestfulltag.version}</tag>
201                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
202                                         </tags>
203                                     </build>
204                                 </image>
205                             </images>
206                         </configuration>
207                         <executions>
208                             <execution>
209                                 <id>generate-images</id>
210                                 <phase>package</phase>
211                                 <goals>
212                                     <goal>build</goal>
213                                 </goals>
214                             </execution>
215
216                             <execution>
217                                 <id>push-images</id>
218                                 <phase>deploy</phase>
219                                 <goals>
220                                     <goal>build</goal>
221                                     <goal>push</goal>
222                                 </goals>
223                             </execution>
224                         </executions>
225                     </plugin>
226                 </plugins>
227             </build>
228         </profile>
229     </profiles>
230 </project>