update DR logging to log under one system
[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>2.1.0-SNAPSHOT</version>
30         <relativePath>../pom.xml</relativePath>
31     </parent>
32     <artifactId>datarouter-node</artifactId>
33     <packaging>jar</packaging>
34     <name>datarouter-node</name>
35     <url>https://github.com/att/DMAAP_DATAROUTER</url>
36     <properties>
37         <sonar.skip>false</sonar.skip>
38         <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
39         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
40         <docker.location>${basedir}/target/${artifactId}</docker.location>
41
42         <timestamp>${maven.build.timestamp}</timestamp>
43         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
44
45         <datarouter.node.image.name>onap/dmaap/datarouter-node</datarouter.node.image.name>
46     </properties>
47     <dependencies>
48         <dependency>
49             <groupId>com.google.guava</groupId>
50             <artifactId>guava</artifactId>
51             <version>${google.guava.version}</version>
52         </dependency>
53         <dependency>
54             <groupId>commons-codec</groupId>
55             <artifactId>commons-codec</artifactId>
56             <version>${commons-codec.version}</version>
57         </dependency>
58         <dependency>
59             <groupId>junit</groupId>
60             <artifactId>junit</artifactId>
61             <version>4.10</version>
62             <scope>test</scope>
63         </dependency>
64         <dependency>
65             <groupId>org.json</groupId>
66             <artifactId>json</artifactId>
67             <version>20160810</version>
68         </dependency>
69         <dependency>
70             <groupId>javax.mail</groupId>
71             <artifactId>javax.mail-api</artifactId>
72             <version>${javax.mail-api.version}</version>
73         </dependency>
74         <dependency>
75             <groupId>com.att.eelf</groupId>
76             <artifactId>eelf-core</artifactId>
77             <version>0.0.1</version>
78         </dependency>
79         <dependency>
80             <groupId>com.thoughtworks.xstream</groupId>
81             <artifactId>xstream</artifactId>
82             <version>${thoughtworks.version}</version>
83         </dependency>
84         <dependency>
85             <groupId>org.codehaus.janino</groupId>
86             <artifactId>janino</artifactId>
87             <version>3.0.7</version>
88         </dependency>
89         <dependency>
90             <groupId>ch.qos.logback</groupId>
91             <artifactId>logback-classic</artifactId>
92             <version>${qos.logback.version}</version>
93             <scope>compile</scope>
94         </dependency>
95         <dependency>
96             <groupId>ch.qos.logback</groupId>
97             <artifactId>logback-core</artifactId>
98             <version>${qos.logback.version}</version>
99             <scope>compile</scope>
100         </dependency>
101         <dependency>
102             <groupId>org.eclipse.jetty</groupId>
103             <artifactId>jetty-server</artifactId>
104             <version>${jetty.version}</version>
105         </dependency>
106         <dependency>
107             <groupId>org.eclipse.jetty</groupId>
108             <artifactId>jetty-continuation</artifactId>
109             <version>${jetty.version}</version>
110         </dependency>
111         <dependency>
112             <groupId>org.eclipse.jetty</groupId>
113             <artifactId>jetty-util</artifactId>
114             <version>${jetty.version}</version>
115         </dependency>
116         <dependency>
117             <groupId>org.eclipse.jetty</groupId>
118             <artifactId>jetty-deploy</artifactId>
119             <version>${jetty.version}</version>
120         </dependency>
121         <dependency>
122             <groupId>org.eclipse.jetty</groupId>
123             <artifactId>jetty-servlet</artifactId>
124             <version>${jetty.version}</version>
125         </dependency>
126         <dependency>
127             <groupId>org.eclipse.jetty</groupId>
128             <artifactId>jetty-servlets</artifactId>
129             <version>${jetty.version}</version>
130         </dependency>
131         <dependency>
132             <groupId>org.eclipse.jetty</groupId>
133             <artifactId>jetty-http</artifactId>
134             <version>${jetty.version}</version>
135         </dependency>
136         <dependency>
137             <groupId>org.eclipse.jetty</groupId>
138             <artifactId>jetty-security</artifactId>
139             <version>${jetty.version}</version>
140         </dependency>
141         <dependency>
142             <groupId>org.eclipse.jetty</groupId>
143             <artifactId>jetty-websocket</artifactId>
144             <version>${jetty.websocket.version}</version>
145         </dependency>
146         <dependency>
147             <groupId>org.eclipse.jetty</groupId>
148             <artifactId>jetty-io</artifactId>
149             <version>${jetty.version}</version>
150         </dependency>
151         <dependency>
152             <groupId>org.apache.commons</groupId>
153             <artifactId>commons-io</artifactId>
154             <version>1.3.2</version>
155         </dependency>
156         <dependency>
157             <groupId>commons-lang</groupId>
158             <artifactId>commons-lang</artifactId>
159             <version>2.4</version>
160         </dependency>
161         <dependency>
162             <groupId>commons-io</groupId>
163             <artifactId>commons-io</artifactId>
164             <version>2.1</version>
165             <scope>compile</scope>
166         </dependency>
167         <dependency>
168             <groupId>org.apache.httpcomponents</groupId>
169             <artifactId>httpcore</artifactId>
170             <version>4.4</version>
171         </dependency>
172         <dependency>
173             <groupId>org.mozilla</groupId>
174             <artifactId>rhino</artifactId>
175             <version>1.7R3</version>
176         </dependency>
177         <dependency>
178             <groupId>org.apache.james</groupId>
179             <artifactId>apache-mime4j-core</artifactId>
180             <version>0.7</version>
181         </dependency>
182         <dependency>
183             <groupId>org.apache.httpcomponents</groupId>
184             <artifactId>httpclient</artifactId>
185             <version>4.5.3</version>
186         </dependency>
187         <dependency>
188             <groupId>org.sonatype.http-testing-harness</groupId>
189             <artifactId>junit-runner</artifactId>
190             <version>0.11</version>
191             <exclusions>
192                 <exclusion>
193                     <groupId>org.databene</groupId>
194                     <artifactId>contiperf</artifactId>
195                 </exclusion>
196             </exclusions>
197         </dependency>
198         <dependency>
199             <groupId>org.mockito</groupId>
200             <artifactId>mockito-core</artifactId>
201             <version>1.10.19</version>
202             <scope>test</scope>
203         </dependency>
204         <dependency>
205             <groupId>org.powermock</groupId>
206             <artifactId>powermock-module-junit4</artifactId>
207             <version>1.6.4</version>
208             <scope>test</scope>
209         </dependency>
210         <dependency>
211             <groupId>org.powermock</groupId>
212             <artifactId>powermock-api-mockito</artifactId>
213             <version>1.6.4</version>
214             <scope>test</scope>
215         </dependency>
216         <dependency>
217             <groupId>org.apache.commons</groupId>
218             <artifactId>commons-lang3</artifactId>
219             <version>3.0</version>
220         </dependency>
221         <dependency>
222             <groupId>org.onap.aaf.authz</groupId>
223             <artifactId>aaf-cadi-aaf</artifactId>
224             <version>${aaf-cadi-aaf.version}</version>
225         </dependency>
226     </dependencies>
227     <profiles>
228         <profile>
229             <id>docker</id>
230             <properties>
231                 <skipDockerBuild>false</skipDockerBuild>
232                 <skipDockerTag>false</skipDockerTag>
233                 <skipTests>true</skipTests>
234             </properties>
235             <build>
236                 <plugins>
237
238                     <!-- Setup image tags per https://wiki.onap.org/display/DW/Independent+Versioning+and+Release+Process#IndependentVersioningandReleaseProcess-StandardizedDockerTagging -->
239                     <plugin>
240                       <groupId>org.codehaus.groovy.maven</groupId>
241                       <artifactId>gmaven-plugin</artifactId>
242                       <executions>
243                           <execution>
244                               <phase>validate</phase>
245                               <goals>
246                                   <goal>execute</goal>
247                               </goals>
248                               <configuration>
249                                   <properties>
250                                       <ver>${project.version}</ver>
251                                       <timestamp>${maven.build.timestamp}</timestamp>
252                                   </properties>
253                                   <source>
254                                       println 'ver: ' + project.properties['ver'];
255                                       if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
256                                           project.properties['dockertag1']=project.properties['ver'] + "-latest";
257                                           project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
258                                       } else {
259                                           project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest";
260                                           project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
261                                       }
262                                       println 'docker tag 1: ' + project.properties['dockertag1'];
263                                       println 'docker tag 2: ' + project.properties['dockertag2'];
264                                   </source>
265                               </configuration>
266                           </execution>
267                       </executions>
268                     </plugin>
269                     <plugin>
270                         <groupId>io.fabric8</groupId>
271                         <artifactId>docker-maven-plugin</artifactId>
272                         <version>0.28.0</version>
273                         <configuration>
274                             <verbose>${docker.verbose}</verbose>
275                             <apiVersion>${docker.apiVersion}</apiVersion>
276                             <pullRegistry>${docker.pull.registry}</pullRegistry>
277                             <pushRegistry>${docker.push.registry}</pushRegistry>
278                             <images>
279                                 <image>
280                                     <name>${datarouter.node.image.name}</name>
281                                     <build>
282                                         <cleanup>try</cleanup>
283                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
284                                         <dockerFile>Dockerfile</dockerFile>
285                                         <tags>
286                                             <tag>${dockertag1}</tag>
287                                             <tag>${dockertag2}</tag>
288                                         </tags>
289                                     </build>
290                                 </image>
291                             </images>
292                         </configuration>
293                          <executions>
294                              <execution>
295                                  <id>generate-images</id>
296                                  <phase>install</phase>
297                                  <goals>
298                                      <goal>build</goal>
299                                  </goals>
300                              </execution>
301                              <execution>
302                                  <id>push-images</id>
303                                  <phase>deploy</phase>
304                                  <goals>
305                                      <goal>push</goal>
306                                  </goals>
307                              </execution>
308                          </executions>
309                     </plugin>
310                 </plugins>
311             </build>
312         </profile>
313     </profiles>
314
315     <build>
316         <finalName>datarouter-node</finalName>
317         <resources>
318             <resource>
319                 <directory>src/main/resources</directory>
320                 <filtering>true</filtering>
321                 <includes>
322                     <include>**/*.properties</include>
323                 </includes>
324             </resource>
325             <resource>
326                 <directory>src/main/resources</directory>
327                 <filtering>true</filtering>
328                 <includes>
329                     <include>**/EelfMessages.properties</include>
330                 </includes>
331             </resource>
332         </resources>
333         <plugins>
334             <plugin>
335                 <groupId>org.apache.maven.plugins</groupId>
336                 <artifactId>maven-compiler-plugin</artifactId>
337                 <configuration>
338                     <source>1.8</source>
339                     <target>1.8</target>
340                 </configuration>
341                 <version>3.6.0</version>
342             </plugin>
343             <plugin>
344                 <artifactId>maven-assembly-plugin</artifactId>
345                 <version>2.4</version>
346                 <configuration>
347                     <descriptorRefs>
348                         <descriptorRef>jar-with-dependencies</descriptorRef>
349                     </descriptorRefs>
350                     <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/lib</outputDirectory>
351                     <archive>
352                         <manifest>
353                             <addClasspath>true</addClasspath>
354                             <mainClass>org.onap.dmaap.datarouter.node.NodeMain</mainClass>
355                         </manifest>
356                     </archive>
357                 </configuration>
358                 <executions>
359                     <execution>
360                         <id>make-assembly</id>
361                         <!-- this is used for inheritance merges -->
362                         <phase>package</phase>
363                         <!-- bind to the packaging phase -->
364                         <goals>
365                             <goal>single</goal>
366                         </goals>
367                     </execution>
368                 </executions>
369             </plugin>
370             <plugin>
371                 <groupId>org.apache.maven.plugins</groupId>
372                 <artifactId>maven-resources-plugin</artifactId>
373                 <version>2.7</version>
374                 <executions>
375                     <execution>
376                         <id>copy-docker-file</id>
377                         <phase>validate</phase>
378                         <goals>
379                             <goal>copy-resources</goal>
380                         </goals>
381                         <configuration>
382                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
383                             <overwrite>true</overwrite>
384                             <resources>
385                                 <resource>
386                                     <directory>${basedir}/src/main/resources/docker</directory>
387                                     <filtering>true</filtering>
388                                     <includes>
389                                         <include>**/*</include>
390                                     </includes>
391                                 </resource>
392                             </resources>
393                         </configuration>
394                     </execution>
395                     <execution>
396                         <id>copy-startup-script</id>
397                         <phase>validate</phase>
398                         <goals>
399                             <goal>copy-resources</goal>
400                         </goals>
401                         <configuration>
402                             <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
403                             <overwrite>true</overwrite>
404                             <resources>
405                                 <resource>
406                                     <directory>${basedir}/src/main/resources/docker</directory>
407                                     <filtering>true</filtering>
408                                     <includes>
409                                         <include>startup.sh</include>
410                                     </includes>
411                                 </resource>
412                             </resources>
413                         </configuration>
414                     </execution>
415                     <execution>
416                         <id>copy-resources-2</id>
417                         <phase>validate</phase>
418                         <goals>
419                             <goal>copy-resources</goal>
420                         </goals>
421                         <configuration>
422                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/etc</outputDirectory>
423                             <resources>
424                                 <resource>
425                                     <directory>${basedir}/src/main/resources</directory>
426                                     <includes>
427                                         <include>misc/**</include>
428                                         <include>**/**</include>
429                                     </includes>
430                                 </resource>
431                             </resources>
432                         </configuration>
433                     </execution>
434                     <execution>
435                         <id>copy-resources-3</id>
436                         <phase>validate</phase>
437                         <goals>
438                             <goal>copy-resources</goal>
439                         </goals>
440                         <configuration>
441                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr</outputDirectory>
442                             <resources>
443                                 <resource>
444                                     <directory>${basedir}/data</directory>
445                                     <includes>
446                                         <include>misc/**</include>
447                                         <include>**/**</include>
448                                     </includes>
449                                 </resource>
450                             </resources>
451                         </configuration>
452                     </execution>
453                     <execution>
454                         <id>copy-resources-4</id>
455                         <phase>validate</phase>
456                         <goals>
457                             <goal>copy-resources</goal>
458                         </goals>
459                         <configuration>
460                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/aaf_certs</outputDirectory>
461                             <resources>
462                                 <resource>
463                                     <directory>${basedir}/aaf_certs</directory>
464                                     <includes>
465                                         <include>misc/**</include>
466                                         <include>**/**</include>
467                                     </includes>
468                                 </resource>
469                             </resources>
470                         </configuration>
471                     </execution>
472                 </executions>
473             </plugin>
474             <plugin>
475                 <groupId>org.apache.maven.plugins</groupId>
476                 <artifactId>maven-dependency-plugin</artifactId>
477                 <version>2.10</version>
478                 <executions>
479                     <execution>
480                         <id>copy-dependencies</id>
481                         <phase>package</phase>
482                         <goals>
483                             <goal>copy-dependencies</goal>
484                         </goals>
485                         <configuration>
486                             <outputDirectory>${project.build.directory}/docker-stage/opt/app/datartr/lib</outputDirectory>
487                             <overWriteReleases>false</overWriteReleases>
488                             <overWriteSnapshots>false</overWriteSnapshots>
489                             <overWriteIfNewer>true</overWriteIfNewer>
490                         </configuration>
491                     </execution>
492                 </executions>
493             </plugin>
494             <plugin>
495                 <groupId>org.apache.maven.plugins</groupId>
496                 <artifactId>maven-javadoc-plugin</artifactId>
497                 <configuration>
498                     <failOnError>false</failOnError>
499                 </configuration>
500                 <executions>
501                     <execution>
502                         <id>attach-javadocs</id>
503                         <goals>
504                             <goal>jar</goal>
505                         </goals>
506                     </execution>
507                 </executions>
508             </plugin>
509             <plugin>
510                 <groupId>org.apache.maven.plugins</groupId>
511                 <artifactId>maven-source-plugin</artifactId>
512                 <version>2.2.1</version>
513                 <executions>
514                     <execution>
515                         <id>attach-sources</id>
516                         <goals>
517                             <goal>jar-no-fork</goal>
518                         </goals>
519                     </execution>
520                 </executions>
521             </plugin>
522             <plugin>
523                 <groupId>org.codehaus.mojo</groupId>
524                 <artifactId>cobertura-maven-plugin</artifactId>
525                 <version>2.7</version>
526                 <configuration>
527                     <formats>
528                         <format>html</format>
529                         <format>xml</format>
530                     </formats>
531                     <check/>
532                 </configuration>
533             </plugin>
534             <plugin>
535                 <groupId>org.sonatype.plugins</groupId>
536                 <artifactId>nexus-staging-maven-plugin</artifactId>
537                 <version>1.6.7</version>
538                 <extensions>true</extensions>
539                 <configuration>
540                     <nexusUrl>${onap.nexus.url}</nexusUrl>
541                     <stagingProfileId>176c31dfe190a</stagingProfileId>
542                     <serverId>ecomp-staging</serverId>
543                 </configuration>
544             </plugin>
545             <plugin>
546                 <groupId>org.jacoco</groupId>
547                 <artifactId>jacoco-maven-plugin</artifactId>
548                 <version>${jacoco.version}</version>
549                 <configuration>
550                     <excludes>
551                         <exclude>**/gen/**</exclude>
552                         <exclude>**/generated-sources/**</exclude>
553                         <exclude>**/yang-gen/**</exclude>
554                         <exclude>**/pax/**</exclude>
555                     </excludes>
556                 </configuration>
557                 <executions>
558                     <execution>
559                         <id>pre-unit-test</id>
560                         <goals>
561                             <goal>prepare-agent</goal>
562                         </goals>
563                         <configuration>
564                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
565                             <propertyName>surefireArgLine</propertyName>
566                         </configuration>
567                     </execution>
568                     <execution>
569                         <id>post-unit-test</id>
570                         <phase>test</phase>
571                         <goals>
572                             <goal>report</goal>
573                         </goals>
574                         <configuration>
575                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
576                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
577                         </configuration>
578                     </execution>
579                     <execution>
580                         <id>pre-integration-test</id>
581                         <phase>pre-integration-test</phase>
582                         <goals>
583                             <goal>prepare-agent</goal>
584                         </goals>
585                         <configuration>
586                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
587                             <propertyName>failsafeArgLine</propertyName>
588                         </configuration>
589                     </execution>
590                     <execution>
591                         <id>post-integration-test</id>
592                         <phase>post-integration-test</phase>
593                         <goals>
594                             <goal>report</goal>
595                         </goals>
596                         <configuration>
597                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
598                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
599                         </configuration>
600                     </execution>
601                 </executions>
602             </plugin>
603         </plugins>
604     </build>
605 </project>