Merge "Change openjdk baseOS imgs to integration-*"
[dmaap/datarouter.git] / datarouter-node / pom.xml
1 <!--
2   ============LICENSE_START==================================================
3   * org.onap.dmaap
4   * ===========================================================================
5   * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6   * Modifications Copyright (C) 2018 Nokia. All rights reserved.
7   * Modifications Copyright (C) 2021 Samsung Electronics. All rights reserved.
8   * ===========================================================================
9   * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   *
13    *      http://www.apache.org/licenses/LICENSE-2.0
14   *
15    * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * ============LICENSE_END====================================================
21   *
22   * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23   *
24 -->
25 <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/maven-v4_0_0.xsd">
26     <modelVersion>4.0.0</modelVersion>
27     <parent>
28         <groupId>org.onap.dmaap.datarouter</groupId>
29         <artifactId>parent</artifactId>
30         <version>${revision}</version>
31         <relativePath>../pom.xml</relativePath>
32     </parent>
33     <artifactId>datarouter-node</artifactId>
34     <packaging>jar</packaging>
35     <url>https://docs.onap.org/en/latest/submodules/dmaap/datarouter.git/docs/index.html</url>
36     <properties>
37         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
38         <docker.location>${basedir}/target/${project.artifactId}</docker.location>
39         <datarouter.node.image.name>${docker.image.root}${project.artifactId}</datarouter.node.image.name>
40         <sonar.exclusions>src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java</sonar.exclusions>
41         <sonar.language>java</sonar.language>
42         <sonar.skip>false</sonar.skip>
43     </properties>
44     <dependencies>
45         <dependency>
46             <groupId>org.apache.commons</groupId>
47             <artifactId>commons-lang3</artifactId>
48         </dependency>
49         <dependency>
50             <groupId>org.slf4j</groupId>
51             <artifactId>slf4j-api</artifactId>
52         </dependency>
53         <dependency>
54             <groupId>commons-codec</groupId>
55             <artifactId>commons-codec</artifactId>
56         </dependency>
57         <dependency>
58             <groupId>commons-io</groupId>
59             <artifactId>commons-io</artifactId>
60         </dependency>
61         <dependency>
62             <groupId>org.json</groupId>
63             <artifactId>json</artifactId>
64         </dependency>
65         <dependency>
66             <groupId>com.att.eelf</groupId>
67             <artifactId>eelf-core</artifactId>
68             <exclusions>
69                 <exclusion>
70                     <artifactId>powermock-api-mockito</artifactId>
71                     <groupId>org.powermock</groupId>
72                 </exclusion>
73             </exclusions>
74         </dependency>
75         <dependency>
76             <groupId>ch.qos.logback</groupId>
77             <artifactId>logback-classic</artifactId>
78         </dependency>
79         <dependency>
80             <groupId>ch.qos.logback</groupId>
81             <artifactId>logback-core</artifactId>
82         </dependency>
83         <dependency>
84             <groupId>javax.servlet</groupId>
85             <artifactId>javax.servlet-api</artifactId>
86         </dependency>
87         <dependency>
88             <groupId>org.eclipse.jetty</groupId>
89             <artifactId>jetty-server</artifactId>
90         </dependency>
91         <dependency>
92             <groupId>org.eclipse.jetty</groupId>
93             <artifactId>jetty-util</artifactId>
94         </dependency>
95         <dependency>
96             <groupId>org.eclipse.jetty</groupId>
97             <artifactId>jetty-servlet</artifactId>
98         </dependency>
99         <dependency>
100             <groupId>org.eclipse.jetty</groupId>
101             <artifactId>jetty-http</artifactId>
102         </dependency>
103         <dependency>
104             <groupId>org.onap.aaf.authz</groupId>
105             <artifactId>aaf-cadi-core</artifactId>
106         </dependency>
107         <dependency>
108             <groupId>com.intellij</groupId>
109             <artifactId>annotations</artifactId>
110         </dependency>
111         <dependency>
112             <groupId>org.hamcrest</groupId>
113             <artifactId>hamcrest-all</artifactId>
114             <scope>test</scope>
115         </dependency>
116         <dependency>
117             <groupId>junit</groupId>
118             <artifactId>junit</artifactId>
119             <scope>test</scope>
120         </dependency>
121         <dependency>
122             <groupId>org.sonatype.http-testing-harness</groupId>
123             <artifactId>junit-runner</artifactId>
124             <scope>test</scope>
125             <exclusions>
126                 <exclusion>
127                     <artifactId>powermock-api-mockito</artifactId>
128                     <groupId>org.powermock</groupId>
129                 </exclusion>
130                 <exclusion>
131                     <artifactId>powermock-reflect</artifactId>
132                     <groupId>org.powermock</groupId>
133                 </exclusion>
134                 <exclusion>
135                     <artifactId>jetty-security</artifactId>
136                     <groupId>org.eclipse.jetty</groupId>
137                 </exclusion>
138                 <exclusion>
139                     <artifactId>jsr305</artifactId>
140                     <groupId>com.google.code.findbugs</groupId>
141                 </exclusion>
142             </exclusions>
143         </dependency>
144         <dependency>
145             <groupId>org.mockito</groupId>
146             <artifactId>mockito-core</artifactId>
147             <scope>test</scope>
148         </dependency>
149         <dependency>
150             <groupId>org.powermock</groupId>
151             <artifactId>powermock-module-junit4</artifactId>
152             <scope>test</scope>
153         </dependency>
154         <dependency>
155             <groupId>org.powermock</groupId>
156             <artifactId>powermock-api-mockito2</artifactId>
157             <scope>test</scope>
158         </dependency>
159         <dependency>
160             <groupId>org.powermock</groupId>
161             <artifactId>powermock-api-support</artifactId>
162             <scope>test</scope>
163         </dependency>
164         <dependency>
165             <groupId>org.powermock</groupId>
166             <artifactId>powermock-core</artifactId>
167             <scope>test</scope>
168         </dependency>
169         <dependency>
170             <groupId>org.powermock</groupId>
171             <artifactId>powermock-module-junit4-rule</artifactId>
172         </dependency>
173         <dependency>
174             <groupId>net.bytebuddy</groupId>
175             <artifactId>byte-buddy</artifactId>
176         </dependency>
177         <dependency>
178             <groupId>net.bytebuddy</groupId>
179             <artifactId>byte-buddy-agent</artifactId>
180         </dependency>
181         <dependency>
182             <groupId>org.objenesis</groupId>
183             <artifactId>objenesis</artifactId>
184         </dependency>
185         <dependency>
186             <groupId>org.javassist</groupId>
187             <artifactId>javassist</artifactId>
188         </dependency>
189         <dependency>
190             <groupId>org.awaitility</groupId>
191             <artifactId>awaitility</artifactId>
192             <version>3.1.6</version>
193             <scope>test</scope>
194         </dependency>
195     </dependencies>
196     <profiles>
197         <profile>
198             <id>docker</id>
199             <properties>
200                 <skipTests>true</skipTests>
201             </properties>
202             <build>
203                 <plugins>
204                     <plugin>
205                         <groupId>org.codehaus.gmaven</groupId>
206                         <artifactId>gmaven-plugin</artifactId>
207                     </plugin>
208                     <plugin>
209                         <groupId>io.fabric8</groupId>
210                         <artifactId>docker-maven-plugin</artifactId>
211                         <configuration>
212                             <images>
213                                 <image>
214                                     <name>${datarouter.node.image.name}</name>
215                                     <build>
216                                         <cleanup>try</cleanup>
217                                         <noCache>true</noCache>
218                                         <optimise>true</optimise>
219                                         <contextDir>${basedir}/target/docker-stage</contextDir>
220                                         <dockerFile>Dockerfile</dockerFile>
221                                         <tags>
222                                             <tag>${dockertag1}</tag>
223                                             <tag>${dockertag2}</tag>
224                                         </tags>
225                                     </build>
226                                 </image>
227                             </images>
228                         </configuration>
229                         <executions>
230                             <execution>
231                                 <id>generate-images</id>
232                                 <phase>install</phase>
233                                 <goals>
234                                     <goal>build</goal>
235                                 </goals>
236                             </execution>
237                             <execution>
238                                 <id>push-images</id>
239                                 <phase>deploy</phase>
240                                 <goals>
241                                     <goal>push</goal>
242                                 </goals>
243                             </execution>
244                         </executions>
245                     </plugin>
246                 </plugins>
247             </build>
248         </profile>
249     </profiles>
250     <build>
251         <finalName>datarouter-node</finalName>
252         <resources>
253             <resource>
254                 <directory>src/main/resources</directory>
255                 <filtering>true</filtering>
256                 <includes>
257                     <include>**/*.properties</include>
258                 </includes>
259             </resource>
260             <resource>
261                 <directory>src/main/resources</directory>
262                 <filtering>true</filtering>
263                 <includes>
264                     <include>**/logback.xml</include>
265                 </includes>
266             </resource>
267         </resources>
268         <plugins>
269             <plugin>
270                 <groupId>org.apache.maven.plugins</groupId>
271                 <artifactId>maven-compiler-plugin</artifactId>
272             </plugin>
273             <plugin>
274                 <artifactId>maven-assembly-plugin</artifactId>
275                 <version>2.4</version>
276                 <configuration>
277                     <descriptorRefs>
278                         <descriptorRef>jar-with-dependencies</descriptorRef>
279                     </descriptorRefs>
280                     <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/lib</outputDirectory>
281                     <archive>
282                         <manifest>
283                             <addClasspath>true</addClasspath>
284                             <mainClass>org.onap.dmaap.datarouter.node.NodeRunner</mainClass>
285                         </manifest>
286                     </archive>
287                 </configuration>
288                 <executions>
289                     <execution>
290                         <id>make-assembly</id>
291                         <!-- this is used for inheritance merges -->
292                         <phase>package</phase>
293                         <!-- bind to the packaging phase -->
294                         <goals>
295                             <goal>single</goal>
296                         </goals>
297                     </execution>
298                 </executions>
299             </plugin>
300             <plugin>
301                 <groupId>org.apache.maven.plugins</groupId>
302                 <artifactId>maven-resources-plugin</artifactId>
303                 <version>2.7</version>
304                 <executions>
305                     <execution>
306                         <id>copy-docker-file</id>
307                         <phase>validate</phase>
308                         <goals>
309                             <goal>copy-resources</goal>
310                         </goals>
311                         <configuration>
312                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
313                             <overwrite>true</overwrite>
314                             <resources>
315                                 <resource>
316                                     <directory>${basedir}/src/main/resources/docker</directory>
317                                     <filtering>true</filtering>
318                                     <includes>
319                                         <include>Dockerfile</include>
320                                     </includes>
321                                 </resource>
322                             </resources>
323                         </configuration>
324                     </execution>
325                     <execution>
326                         <id>copy-startup-script</id>
327                         <phase>validate</phase>
328                         <goals>
329                             <goal>copy-resources</goal>
330                         </goals>
331                         <configuration>
332                             <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
333                             <overwrite>true</overwrite>
334                             <resources>
335                                 <resource>
336                                     <directory>${basedir}/src/main/resources/docker</directory>
337                                     <filtering>true</filtering>
338                                     <includes>
339                                         <include>startup.sh</include>
340                                     </includes>
341                                 </resource>
342                             </resources>
343                         </configuration>
344                     </execution>
345                     <execution>
346                         <id>copy-resources-etc</id>
347                         <phase>validate</phase>
348                         <goals>
349                             <goal>copy-resources</goal>
350                         </goals>
351                         <configuration>
352                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/etc</outputDirectory>
353                             <resources>
354                                 <resource>
355                                     <directory>${basedir}/src/main/resources</directory>
356                                     <includes>
357                                         <include>misc/**</include>
358                                         <include>**/**</include>
359                                     </includes>
360                                     <excludes>
361                                         <exclude>aaf/**</exclude>
362                                         <exclude>docker/**</exclude>
363                                     </excludes>
364                                 </resource>
365                             </resources>
366                         </configuration>
367                     </execution>
368                     <execution>
369                         <id>copy-aaf-props</id>
370                         <phase>validate</phase>
371                         <goals>
372                             <goal>copy-resources</goal>
373                         </goals>
374                         <configuration>
375                             <outputDirectory>${basedir}/target/docker-stage/opt/app/osaaf/local</outputDirectory>
376                             <resources>
377                                 <resource>
378                                     <directory>${basedir}/src/main/resources/aaf</directory>
379                                     <includes>
380                                         <include>**/**</include>
381                                     </includes>
382                                 </resource>
383                             </resources>
384                         </configuration>
385                     </execution>
386                 </executions>
387             </plugin>
388             <plugin>
389                 <groupId>org.apache.maven.plugins</groupId>
390                 <artifactId>maven-javadoc-plugin</artifactId>
391             </plugin>
392             <plugin>
393                 <groupId>org.apache.maven.plugins</groupId>
394                 <artifactId>maven-source-plugin</artifactId>
395             </plugin>
396             <plugin>
397                 <groupId>org.codehaus.mojo</groupId>
398                 <artifactId>cobertura-maven-plugin</artifactId>
399             </plugin>
400             <plugin>
401                 <groupId>org.jacoco</groupId>
402                 <artifactId>jacoco-maven-plugin</artifactId>
403                 <configuration>
404                     <excludes>
405                         <exclude>src/main/java/org/onap/dmaap/datarouter/node/NodeRunner.java</exclude>
406                     </excludes>
407                 </configuration>
408             </plugin>
409             <plugin>
410                 <groupId>org.codehaus.mojo</groupId>
411                 <artifactId>properties-maven-plugin</artifactId>
412             </plugin>
413         </plugins>
414     </build>
415 </project>