Fix docker tags
[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"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5
6     <parent>
7         <groupId>org.onap.ccsdk.parent</groupId>
8         <artifactId>odlparent-lite</artifactId>
9         <version>1.2.1-SNAPSHOT</version>
10     </parent>
11     <modelVersion>4.0.0</modelVersion>
12     <packaging>pom</packaging>
13     <groupId>org.onap.sdnc.oam</groupId>
14     <artifactId>installation-dmaap-listener</artifactId>
15     <version>1.5.0-SNAPSHOT</version>
16
17     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
18     <description>Creates dmaap-listener Docker container</description>
19
20     <properties>
21         <image.name>onap/sdnc-dmaap-listener-image</image.name>
22         <sdnc.project.version>${project.version}</sdnc.project.version>
23         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
24         <ccsdk.docker.version>0.4-STAGING-latest</ccsdk.docker.version>
25         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
26         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
27     </properties>
28
29
30     <build>
31         <plugins>
32
33
34             <plugin>
35                 <groupId>org.codehaus.groovy.maven</groupId>
36                 <artifactId>gmaven-plugin</artifactId>
37                 <executions>
38                     <execution>
39                         <phase>validate</phase>
40                         <goals>
41                             <goal>execute</goal>
42                         </goals>
43                         <configuration>
44                             <source>${basedir}/../TagVersion.groovy</source>
45                         </configuration>
46                     </execution>
47                 </executions>
48             </plugin>
49
50
51
52             <plugin>
53                 <artifactId>maven-resources-plugin</artifactId>
54                 <version>2.6</version>
55                 <executions>
56                     <execution>
57                         <id>copy-dockerfile</id>
58                         <goals>
59                             <goal>copy-resources</goal>
60                         </goals><!-- here the phase you need -->
61                         <phase>validate</phase>
62                         <configuration>
63                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
64                             <resources>
65                                 <resource>
66                                     <directory>src/main/docker</directory>
67                                     <includes>
68                                         <include>Dockerfile</include>
69                                     </includes>
70                                     <filtering>true</filtering>
71                                 </resource>
72                             </resources>
73                         </configuration>
74                     </execution>
75
76                     <execution>
77                         <id>copy-scripts</id>
78                         <goals>
79                             <goal>copy-resources</goal>
80                         </goals><!-- here the phase you need -->
81                         <phase>validate</phase>
82                         <configuration>
83                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/dmaap-listener/bin</outputDirectory>
84                             <resources>
85                                 <resource>
86                                     <directory>src/main/scripts</directory>
87                                     <includes>
88                                         <include>*.sh</include>
89                                     </includes>
90                                     <filtering>false</filtering>
91                                 </resource>
92                             </resources>
93                         </configuration>
94                     </execution>
95
96                     <execution>
97                         <id>copy-properties</id>
98                         <goals>
99                             <goal>copy-resources</goal>
100                         </goals><!-- here the phase you need -->
101                         <phase>validate</phase>
102                         <configuration>
103                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
104                             <resources>
105                                 <resource>
106                                     <directory>src/main/properties</directory>
107                                     <includes>
108                                         <include>*</include>
109                                     </includes>
110                                     <filtering>false</filtering>
111                                 </resource>
112                             </resources>
113                         </configuration>
114                     </execution>
115
116                 </executions>
117             </plugin>
118             <plugin>
119                 <groupId>org.apache.maven.plugins</groupId>
120                 <artifactId>maven-dependency-plugin</artifactId>
121                 <executions>
122                     <execution>
123                         <id>unpack</id>
124                         <goals>
125                             <goal>unpack</goal>
126                         </goals>
127                         <phase>initialize</phase>
128                         <configuration>
129                             <artifactItems>
130                                 <artifactItem>
131                                     <groupId>org.onap.ccsdk.sli.northbound</groupId>
132                                     <artifactId>dmaap-listener</artifactId>
133                                     <type>zip</type>
134                                     <version>${ccsdk.sli.northbound.version}</version>
135                                 </artifactItem>
136                             </artifactItems>
137                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/dmaap-listener</outputDirectory>
138                             <excludes>bin/**,**/*-javadoc.jar,**/*-sources.jar</excludes>
139                             <overWriteReleases>true</overWriteReleases>
140                             <overWriteSnapshots>true</overWriteSnapshots>
141                         </configuration>
142                     </execution>
143                 </executions>
144             </plugin>
145
146             <plugin>
147                 <artifactId>exec-maven-plugin</artifactId>
148                 <groupId>org.codehaus.mojo</groupId>
149                 <version>1.5.0</version>
150                 <executions>
151
152
153
154                     <execution>
155                         <id>change shell permissions</id>
156                         <phase>process-sources</phase>
157                         <goals>
158                             <goal>exec</goal>
159                         </goals>
160                         <configuration>
161                             <executable>/usr/bin/find</executable>
162                             <arguments>
163                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
164                                 <argument>-name</argument>
165                                 <argument>*.sh</argument>
166                                 <argument>-exec</argument>
167                                 <argument>chmod</argument>
168                                 <argument>+x</argument>
169                                 <argument>{}</argument>
170                                 <argument>;</argument>
171                             </arguments>
172                         </configuration>
173                     </execution>
174                 </executions>
175             </plugin>
176         </plugins>
177
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     <organization>
231         <name>ONAP</name>
232     </organization>
233 </project>