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