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