Docker Image
[logging-analytics/pomba/pomba-context-aggregator.git] / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
5         <modelVersion>4.0.0</modelVersion>
6
7         <groupId>org.onap.logging-analytics.pomba</groupId>
8         <artifactId>pomba-context-aggregator</artifactId>
9         <version>1.3.0-SNAPSHOT</version>
10
11         <parent>
12                 <groupId>org.onap.oparent</groupId>
13                 <artifactId>oparent</artifactId>
14                 <version>1.1.1</version>
15                 <relativePath />
16         </parent>
17
18         <properties>
19                 <java.version>1.8</java.version>
20                 <dmaap.client.version>1.1.5</dmaap.client.version>
21                 <aai.rest.client.version>1.2.1</aai.rest.client.version>
22                 <!--docker-->
23         <docker.tag>${project.version}-${timestamp}</docker.tag>
24         <docker.latest.tag>${project.version}-latest</docker.latest.tag>
25         <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
26         <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
27         </properties>
28
29         <dependencyManagement>
30                 <dependencies>
31                         <dependency>
32                                 <groupId>org.springframework.boot</groupId>
33                                 <artifactId>spring-boot-dependencies</artifactId>
34                                 <version>1.5.12.RELEASE</version>
35                                 <type>pom</type>
36                                 <scope>import</scope>
37                         </dependency>
38                 </dependencies>
39         </dependencyManagement>
40
41         <dependencies>
42                 <dependency>
43                         <groupId>org.eclipse.jetty</groupId>
44                         <artifactId>jetty-security</artifactId>
45                 </dependency>
46                 <dependency>
47                         <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
48                         <artifactId>dmaapClient</artifactId>
49                         <version>${dmaap.client.version}</version>
50                 </dependency>
51                 <dependency>
52                         <groupId>org.onap.aai</groupId>
53                         <artifactId>rest-client</artifactId>
54                         <version>${aai.rest.client.version}</version>
55                         <exclusions>
56                                 <exclusion>
57                                         <groupId>org.apache.logging.log4j</groupId>
58                                         <artifactId>log4j-slf4j-impl</artifactId>
59                                 </exclusion>
60                         </exclusions>
61                 </dependency>
62                 <dependency>
63                         <groupId>org.springframework.boot</groupId>
64                         <artifactId>spring-boot-starter-web</artifactId>
65                 </dependency>
66                 <dependency>
67                         <groupId>org.springframework.boot</groupId>
68                         <artifactId>spring-boot-starter-actuator</artifactId>
69                 </dependency>
70                 <dependency>
71                         <groupId>org.onap.logging-analytics.pomba</groupId>
72                         <artifactId>pomba-audit-common</artifactId>
73                         <version>1.3.0-SNAPSHOT</version>
74                 </dependency>
75                 <dependency>
76                         <groupId>com.google.code.gson</groupId>
77                         <artifactId>gson</artifactId>
78                 </dependency>
79                 <!-- logging dependencies -->
80                 <dependency>
81                         <groupId>org.slf4j</groupId>
82                         <artifactId>slf4j-api</artifactId>
83                 </dependency>
84                 <dependency>
85                         <groupId>org.onap.logging-analytics</groupId>
86                         <artifactId>logging-slf4j</artifactId>
87                         <version>1.2.2-SNAPSHOT</version>
88                         <exclusions>
89                                 <exclusion>
90                                         <groupId>com.att.eelf</groupId>
91                                         <artifactId>eelf-core</artifactId>
92                                 </exclusion>
93                         </exclusions>
94                 </dependency>
95
96                 <!-- JUnit dependencies -->
97                 <dependency>
98                         <groupId>junit</groupId>
99                         <artifactId>junit</artifactId>
100                         <scope>test</scope>
101                 </dependency>
102                 <dependency>
103                         <groupId>org.springframework</groupId>
104                         <artifactId>spring-test</artifactId>
105                         <version>4.3.6.RELEASE</version>
106                         <scope>test</scope>
107                 </dependency>
108                 <dependency>
109                         <groupId>org.springframework.boot</groupId>
110                         <artifactId>spring-boot-test</artifactId>
111                         <version>1.5.1.RELEASE</version>
112                         <scope>test</scope>
113                 </dependency>
114                 <dependency>
115                         <groupId>org.mockito</groupId>
116                         <artifactId>mockito-all</artifactId>
117                         <version>1.10.19</version>
118                         <scope>test</scope>
119                 </dependency>
120                 <dependency>
121                         <groupId>org.springframework.boot</groupId>
122                         <artifactId>spring-boot-configuration-processor</artifactId>
123                         <optional>true</optional>
124                 </dependency>
125
126         </dependencies>
127
128         <build>
129                 <finalName>${project.artifactId}</finalName>
130                 <plugins>
131                         <plugin>
132                                 <groupId>org.apache.maven.plugins</groupId>
133                                 <artifactId>maven-resources-plugin</artifactId>
134                                 <executions>
135                                         <execution>
136                                                 <id>copy-docker-file</id>
137                                                 <phase>package</phase>
138                                                 <goals>
139                                                         <goal>copy-resources</goal>
140                                                 </goals>
141                                                 <configuration>
142                                                         <outputDirectory>target</outputDirectory>
143                                                         <overwrite>true</overwrite>
144                                                         <resources>
145                                                                 <resource>
146                                                                         <directory>${basedir}/src/main/docker</directory>
147                                                                         <filtering>true</filtering>
148                                                                         <includes>
149                                                                                 <include>**/*</include>
150                                                                         </includes>
151                                                                 </resource>
152                                                         </resources>
153                                                 </configuration>
154                                         </execution>
155                                 </executions>
156                         </plugin>
157                         <!--<plugin>
158                                 <groupId>com.spotify</groupId>
159                                 <artifactId>docker-maven-plugin</artifactId>
160                                 <version>0.4.11</version>
161                                 <dependencies>
162                                         <dependency>
163                                                 <groupId>com.github.jnr</groupId>
164                                                 <artifactId>jnr-unixsocket</artifactId>
165                                                 <version>0.13</version>
166                                         </dependency>
167                                 </dependencies>
168                                 <configuration>
169                                         <verbose>true</verbose>
170                                         <serverId>docker-hub</serverId>
171                                         <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
172                                         <dockerDirectory>${docker.location}</dockerDirectory>
173                                         <imageTags>
174                                                 <imageTag>latest</imageTag>
175                                         </imageTags>
176                                         <forceTags>true</forceTags>
177                                 </configuration>
178                         </plugin>-->
179                         <plugin>
180                                 <groupId>org.springframework.boot</groupId>
181                                 <artifactId>spring-boot-maven-plugin</artifactId>
182                                 <executions>
183                                         <execution>
184                                                 <goals>
185                                                         <goal>repackage</goal>
186                                                 </goals>
187                                         </execution>
188                                 </executions>
189                         </plugin>
190                 </plugins>
191
192                 <resources>
193                         <resource>
194                                 <targetPath>config</targetPath>
195                                 <directory>config</directory>
196                                 <filtering>true</filtering>
197                                 <includes>
198                                         <include>**/*</include>
199                                 </includes>
200                         </resource>
201                 </resources>
202         </build>
203
204         <profiles>
205                 <profile>
206                         <id>docker</id>
207                         <build>
208                         <plugins>
209                                 <plugin>
210             <groupId>io.fabric8</groupId>
211             <artifactId>docker-maven-plugin</artifactId>
212             <version>0.19.1</version>
213             <configuration>
214                 <verbose>true</verbose>
215                 <apiVersion>1.23</apiVersion>
216                 <!-- <pullRegistry>${docker.pull.registry}</pullRegistry>
217                 <pushRegistry>${docker.push.registry}</pushRegistry>
218                 <dockerHost>${docker.pull.registry}</dockerHost> -->
219                 <images>
220                     <image>
221                         <name>onap/${project.artifactId}</name>
222                         <alias>${project.artifactId}</alias>
223                         <build>
224                             <cleanup>try</cleanup>
225                             <dockerFileDir>${project.basedir}/target/docker-stage</dockerFileDir>
226                                                         <dockerFile>${project.basedir}/target/docker-stage/Dockerfile</dockerFile>
227                             <tags>
228                                 <tag>${docker.snapshot.tag}</tag>
229                                 <tag>${docker.latest.tag}</tag>
230                             </tags>
231                             <!-- <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir> -->
232                         </build>
233                     </image>
234                 </images>
235             </configuration>
236             <executions>
237                 <!-- <execution>
238                    <id>clean-images</id>
239                     <phase>pre-clean</phase>
240                     <goals>
241                         <goal>remove</goal>
242                     </goals>
243                     <configuration>
244                         <removeAll>true</removeAll>
245                     </configuration>
246                 </execution> -->
247
248                 <execution>
249                     <id>generate-images</id>
250                     <!-- <phase>package</phase> -->
251                     <phase>generate-sources</phase>
252                     <goals>
253                         <goal>build</goal>
254                     </goals>
255                 </execution>
256                 <execution>
257                     <id>push-images</id>
258                     <phase>deploy</phase>
259                     <goals>
260                         <goal>build</goal>
261                         <goal>push</goal>
262                     </goals>
263                     <!--<configuration>
264                         <image>onap/vvp/cms</image>
265                     </configuration>  -->
266                 </execution>
267             </executions>
268         </plugin>
269         <plugin>
270                                 <artifactId>maven-resources-plugin</artifactId>
271                                 <version>2.6</version>
272                                 <executions>
273                                         <execution>
274                                                 <id>copy-dockerfile</id>
275                                                 <goals>
276                                                         <goal>copy-resources</goal>
277                                                 </goals><!-- here the phase you need -->
278                                                 <phase>validate</phase>
279                                                 <configuration>
280                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
281                                                         <resources>
282                                                                 <resource>
283                                                                         <directory>src/main/docker</directory>
284                                                                         <includes>
285                                                                                 <include>Dockerfile</include>
286                                                                         </includes>
287                                                                         <filtering>true</filtering>
288                                                                 </resource>
289                                                         </resources>
290                                                 </configuration>
291                                         </execution>
292                                         <!-- <execution>
293                                                 <id>copy-properties</id>
294                                                 <goals>
295                                                         <goal>copy-resources</goal>
296                                                 </goals>
297                                                 <phase>validate</phase>
298                                                 <configuration>
299                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
300                                                         <resources>
301                                                                 <resource>
302                                                                         <directory>../src/main/properties</directory>
303                                                                         <includes>
304                                                                                 <include>*.properties</include>
305                                                                                 <include>*.properties.sdnctldb01</include>
306                                                                         </includes>
307                                                                         <filtering>false</filtering>
308                                                                 </resource>
309                                                         </resources>
310                                                 </configuration>
311                                         </execution>-->
312                                 </executions>
313                         </plugin>
314         </plugins>
315         </build>
316         </profile>
317         </profiles>
318 </project>