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