More unit test coverage and code cleanup
[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.hamcrest</groupId>
46             <artifactId>hamcrest-library</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>junit</groupId>
62             <artifactId>junit</artifactId>
63         </dependency>
64         <dependency>
65             <groupId>org.json</groupId>
66             <artifactId>json</artifactId>
67         </dependency>
68         <dependency>
69             <groupId>com.att.eelf</groupId>
70             <artifactId>eelf-core</artifactId>
71         </dependency>
72         <dependency>
73             <groupId>ch.qos.logback</groupId>
74             <artifactId>logback-classic</artifactId>
75         </dependency>
76         <dependency>
77             <groupId>ch.qos.logback</groupId>
78             <artifactId>logback-core</artifactId>
79         </dependency>
80         <dependency>
81             <groupId>com.intellij</groupId>
82             <artifactId>annotations</artifactId>
83         </dependency>
84         <dependency>
85             <groupId>javax.servlet</groupId>
86             <artifactId>javax.servlet-api</artifactId>
87         </dependency>
88         <dependency>
89             <groupId>org.eclipse.jetty</groupId>
90             <artifactId>jetty-server</artifactId>
91         </dependency>
92         <dependency>
93             <groupId>org.eclipse.jetty</groupId>
94             <artifactId>jetty-util</artifactId>
95         </dependency>
96         <dependency>
97             <groupId>org.eclipse.jetty</groupId>
98             <artifactId>jetty-servlet</artifactId>
99         </dependency>
100         <dependency>
101             <groupId>org.eclipse.jetty</groupId>
102             <artifactId>jetty-http</artifactId>
103         </dependency>
104         <dependency>
105             <groupId>org.onap.aaf.authz</groupId>
106             <artifactId>aaf-cadi-core</artifactId>
107         </dependency>
108         <dependency>
109             <groupId>org.sonatype.http-testing-harness</groupId>
110             <artifactId>junit-runner</artifactId>
111         </dependency>
112         <dependency>
113             <groupId>org.mockito</groupId>
114             <artifactId>mockito-core</artifactId>
115         </dependency>
116         <dependency>
117             <groupId>org.powermock</groupId>
118             <artifactId>powermock-module-junit4</artifactId>
119         </dependency>
120         <dependency>
121             <groupId>org.powermock</groupId>
122             <artifactId>powermock-api-mockito</artifactId>
123         </dependency>
124         <dependency>
125             <groupId>org.powermock</groupId>
126             <artifactId>powermock-api-support</artifactId>
127         </dependency>
128         <dependency>
129             <groupId>org.powermock</groupId>
130             <artifactId>powermock-core</artifactId>
131         </dependency>
132         <dependency>
133             <groupId>org.apache.commons</groupId>
134             <artifactId>commons-lang3</artifactId>
135         </dependency>
136         <dependency>
137             <groupId>org.awaitility</groupId>
138             <artifactId>awaitility</artifactId>
139             <version>3.1.6</version>
140         </dependency>
141     </dependencies>
142     <profiles>
143         <profile>
144             <id>docker</id>
145             <properties>
146                 <skipTests>true</skipTests>
147             </properties>
148             <build>
149                 <plugins>
150                     <plugin>
151                         <groupId>org.codehaus.gmaven</groupId>
152                         <artifactId>gmaven-plugin</artifactId>
153                     </plugin>
154                     <plugin>
155                         <groupId>io.fabric8</groupId>
156                         <artifactId>docker-maven-plugin</artifactId>
157                         <configuration>
158                             <images>
159                                 <image>
160                                     <name>${datarouter.node.image.name}</name>
161                                     <build>
162                                         <cleanup>try</cleanup>
163                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
164                                         <dockerFile>Dockerfile</dockerFile>
165                                         <tags>
166                                             <tag>${dockertag1}</tag>
167                                             <tag>${dockertag2}</tag>
168                                         </tags>
169                                     </build>
170                                 </image>
171                             </images>
172                         </configuration>
173                         <executions>
174                             <execution>
175                                 <id>generate-images</id>
176                                 <phase>install</phase>
177                                 <goals>
178                                     <goal>build</goal>
179                                 </goals>
180                             </execution>
181                             <execution>
182                                 <id>push-images</id>
183                                 <phase>deploy</phase>
184                                 <goals>
185                                     <goal>push</goal>
186                                 </goals>
187                             </execution>
188                         </executions>
189                     </plugin>
190                 </plugins>
191             </build>
192         </profile>
193     </profiles>
194     <build>
195         <finalName>datarouter-node</finalName>
196         <resources>
197             <resource>
198                 <directory>src/main/resources</directory>
199                 <filtering>true</filtering>
200                 <includes>
201                     <include>**/*.properties</include>
202                 </includes>
203             </resource>
204             <resource>
205                 <directory>src/main/resources</directory>
206                 <filtering>true</filtering>
207                 <includes>
208                     <include>**/EelfMessages.properties</include>
209                 </includes>
210             </resource>
211         </resources>
212         <plugins>
213             <plugin>
214                 <groupId>org.apache.maven.plugins</groupId>
215                 <artifactId>maven-compiler-plugin</artifactId>
216             </plugin>
217             <plugin>
218                 <artifactId>maven-assembly-plugin</artifactId>
219                 <version>2.4</version>
220                 <configuration>
221                     <descriptorRefs>
222                         <descriptorRef>jar-with-dependencies</descriptorRef>
223                     </descriptorRefs>
224                     <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/lib</outputDirectory>
225                     <archive>
226                         <manifest>
227                             <addClasspath>true</addClasspath>
228                             <mainClass>org.onap.dmaap.datarouter.node.NodeMain</mainClass>
229                         </manifest>
230                     </archive>
231                 </configuration>
232                 <executions>
233                     <execution>
234                         <id>make-assembly</id>
235                         <!-- this is used for inheritance merges -->
236                         <phase>package</phase>
237                         <!-- bind to the packaging phase -->
238                         <goals>
239                             <goal>single</goal>
240                         </goals>
241                     </execution>
242                 </executions>
243             </plugin>
244             <plugin>
245                 <groupId>org.apache.maven.plugins</groupId>
246                 <artifactId>maven-resources-plugin</artifactId>
247                 <version>2.7</version>
248                 <executions>
249                     <execution>
250                         <id>copy-docker-file</id>
251                         <phase>validate</phase>
252                         <goals>
253                             <goal>copy-resources</goal>
254                         </goals>
255                         <configuration>
256                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
257                             <overwrite>true</overwrite>
258                             <resources>
259                                 <resource>
260                                     <directory>${basedir}/src/main/resources/docker</directory>
261                                     <filtering>true</filtering>
262                                     <includes>
263                                         <include>**/*</include>
264                                     </includes>
265                                 </resource>
266                             </resources>
267                         </configuration>
268                     </execution>
269                     <execution>
270                         <id>copy-startup-script</id>
271                         <phase>validate</phase>
272                         <goals>
273                             <goal>copy-resources</goal>
274                         </goals>
275                         <configuration>
276                             <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
277                             <overwrite>true</overwrite>
278                             <resources>
279                                 <resource>
280                                     <directory>${basedir}/src/main/resources/docker</directory>
281                                     <filtering>true</filtering>
282                                     <includes>
283                                         <include>startup.sh</include>
284                                     </includes>
285                                 </resource>
286                             </resources>
287                         </configuration>
288                     </execution>
289                     <execution>
290                         <id>copy-resources-2</id>
291                         <phase>validate</phase>
292                         <goals>
293                             <goal>copy-resources</goal>
294                         </goals>
295                         <configuration>
296                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/etc</outputDirectory>
297                             <resources>
298                                 <resource>
299                                     <directory>${basedir}/src/main/resources</directory>
300                                     <includes>
301                                         <include>misc/**</include>
302                                         <include>**/**</include>
303                                     </includes>
304                                 </resource>
305                             </resources>
306                         </configuration>
307                     </execution>
308                     <execution>
309                         <id>copy-resources-3</id>
310                         <phase>validate</phase>
311                         <goals>
312                             <goal>copy-resources</goal>
313                         </goals>
314                         <configuration>
315                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr</outputDirectory>
316                             <resources>
317                                 <resource>
318                                     <directory>${basedir}/data</directory>
319                                     <includes>
320                                         <include>misc/**</include>
321                                         <include>**/**</include>
322                                     </includes>
323                                 </resource>
324                             </resources>
325                         </configuration>
326                     </execution>
327                     <execution>
328                         <id>copy-resources-4</id>
329                         <phase>validate</phase>
330                         <goals>
331                             <goal>copy-resources</goal>
332                         </goals>
333                         <configuration>
334                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/aaf_certs</outputDirectory>
335                             <resources>
336                                 <resource>
337                                     <directory>${basedir}/aaf_certs</directory>
338                                     <includes>
339                                         <include>misc/**</include>
340                                         <include>**/**</include>
341                                     </includes>
342                                 </resource>
343                             </resources>
344                         </configuration>
345                     </execution>
346                 </executions>
347             </plugin>
348             <plugin>
349                 <groupId>org.apache.maven.plugins</groupId>
350                 <artifactId>maven-dependency-plugin</artifactId>
351                 <executions>
352                     <execution>
353                         <id>copy-dependencies</id>
354                         <phase>package</phase>
355                         <configuration>
356                             <outputDirectory>${project.build.directory}/docker-stage/opt/app/datartr/lib</outputDirectory>
357                         </configuration>
358                     </execution>
359                 </executions>
360             </plugin>
361             <plugin>
362                 <groupId>org.apache.maven.plugins</groupId>
363                 <artifactId>maven-javadoc-plugin</artifactId>
364             </plugin>
365             <plugin>
366                 <groupId>org.apache.maven.plugins</groupId>
367                 <artifactId>maven-source-plugin</artifactId>
368             </plugin>
369             <plugin>
370                 <groupId>org.codehaus.mojo</groupId>
371                 <artifactId>cobertura-maven-plugin</artifactId>
372             </plugin>
373             <plugin>
374                 <groupId>org.jacoco</groupId>
375                 <artifactId>jacoco-maven-plugin</artifactId>
376                 <configuration>
377                     <excludes>
378                         <exclude>src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java</exclude>
379                     </excludes>
380                 </configuration>
381             </plugin>
382             <plugin>
383                 <groupId>org.codehaus.mojo</groupId>
384                 <artifactId>properties-maven-plugin</artifactId>
385             </plugin>
386         </plugins>
387     </build>
388 </project>