2 ============LICENSE_START==================================================
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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====================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
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>
27 <groupId>org.onap.dmaap.datarouter</groupId>
28 <artifactId>parent</artifactId>
29 <version>2.0.2-SNAPSHOT</version>
30 <relativePath>../pom.xml</relativePath>
32 <artifactId>datarouter-subscriber</artifactId>
33 <packaging>jar</packaging>
34 <name>datarouter-subscriber</name>
36 <sonar.language>java</sonar.language>
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>
41 <docker.location>${basedir}/target/${artifactId}</docker.location>
42 <datarouter.prov.image.name>onap/dmaap/datarouter-subscriber</datarouter.prov.image.name>
44 <timestamp>${maven.build.timestamp}</timestamp>
45 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
49 <groupId>com.google.guava</groupId>
50 <artifactId>guava</artifactId>
51 <version>${google.guava.version}</version>
54 <groupId>commons-codec</groupId>
55 <artifactId>commons-codec</artifactId>
56 <version>${commons-codec.version}</version>
59 <groupId>org.eclipse.jetty</groupId>
60 <artifactId>jetty-server</artifactId>
61 <version>${jetty.version}</version>
64 <groupId>org.eclipse.jetty</groupId>
65 <artifactId>jetty-continuation</artifactId>
66 <version>${jetty.version}</version>
69 <groupId>org.eclipse.jetty</groupId>
70 <artifactId>jetty-util</artifactId>
71 <version>${jetty.version}</version>
74 <groupId>org.eclipse.jetty</groupId>
75 <artifactId>jetty-deploy</artifactId>
76 <version>${jetty.version}</version>
79 <groupId>org.eclipse.jetty</groupId>
80 <artifactId>jetty-servlet</artifactId>
81 <version>${jetty.version}</version>
84 <groupId>org.eclipse.jetty</groupId>
85 <artifactId>jetty-servlets</artifactId>
86 <version>${jetty.version}</version>
89 <groupId>org.eclipse.jetty</groupId>
90 <artifactId>jetty-http</artifactId>
91 <version>${jetty.version}</version>
94 <groupId>org.eclipse.jetty</groupId>
95 <artifactId>jetty-security</artifactId>
96 <version>${jetty.version}</version>
99 <groupId>org.eclipse.jetty</groupId>
100 <artifactId>jetty-websocket</artifactId>
101 <version>${jetty.websocket.version}</version>
104 <groupId>org.eclipse.jetty</groupId>
105 <artifactId>jetty-io</artifactId>
106 <version>${jetty.version}</version>
109 <groupId>com.thoughtworks.xstream</groupId>
110 <artifactId>xstream</artifactId>
111 <version>${thoughtworks.version}</version>
114 <groupId>ch.qos.logback</groupId>
115 <artifactId>logback-classic</artifactId>
116 <version>${qos.logback.version}</version>
117 <scope>compile</scope>
120 <groupId>ch.qos.logback</groupId>
121 <artifactId>logback-core</artifactId>
122 <version>${qos.logback.version}</version>
123 <scope>compile</scope>
126 <groupId>org.apache.httpcomponents</groupId>
127 <artifactId>httpclient</artifactId>
128 <version>4.5.3</version>
131 <groupId>org.sonatype.http-testing-harness</groupId>
132 <artifactId>junit-runner</artifactId>
133 <version>0.11</version>
136 <groupId>org.databene</groupId>
137 <artifactId>contiperf</artifactId>
142 <groupId>junit</groupId>
143 <artifactId>junit</artifactId>
144 <version>4.10</version>
148 <groupId>log4j</groupId>
149 <artifactId>log4j</artifactId>
150 <version>1.2.17</version>
151 <scope>compile</scope>
154 <groupId>org.apache.commons</groupId>
155 <artifactId>commons-io</artifactId>
156 <version>1.3.2</version>
163 <skipDockerBuild>false</skipDockerBuild>
164 <skipDockerTag>false</skipDockerTag>
165 <skipTests>true</skipTests>
170 <!-- Setup image tags per https://wiki.onap.org/display/DW/Independent+Versioning+and+Release+Process#IndependentVersioningandReleaseProcess-StandardizedDockerTagging -->
172 <groupId>org.codehaus.groovy.maven</groupId>
173 <artifactId>gmaven-plugin</artifactId>
176 <phase>validate</phase>
182 <ver>${project.version}</ver>
183 <timestamp>${maven.build.timestamp}</timestamp>
186 println 'ver: ' + project.properties['ver'];
187 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
188 project.properties['dockertag1']=project.properties['ver'] + "-latest";
189 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
191 project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest";
192 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
194 println 'docker tag 1: ' + project.properties['dockertag1'];
195 println 'docker tag 2: ' + project.properties['dockertag2'];
202 <groupId>io.fabric8</groupId>
203 <artifactId>docker-maven-plugin</artifactId>
204 <version>0.28.0</version>
206 <verbose>${docker.verbose}</verbose>
207 <apiVersion>${docker.apiVersion}</apiVersion>
208 <pullRegistry>${docker.pull.registry}</pullRegistry>
209 <pushRegistry>${docker.push.registry}</pushRegistry>
212 <name>${datarouter.prov.image.name}</name>
214 <cleanup>try</cleanup>
215 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
216 <dockerFile>Dockerfile</dockerFile>
218 <tag>${dockertag1}</tag>
219 <tag>${dockertag2}</tag>
227 <id>generate-images</id>
228 <phase>install</phase>
235 <phase>deploy</phase>
247 <finalName>datarouter-subscriber</finalName>
250 <directory>src/main/resources</directory>
251 <filtering>true</filtering>
253 <include>**/*.properties</include>
257 <directory>src/main/resources</directory>
258 <filtering>true</filtering>
260 <include>**/subscriber.properties</include>
264 <directory>src/main/resources</directory>
265 <filtering>true</filtering>
267 <include>**/log4j.properties</include>
271 <directory>src/test/resources</directory>
272 <filtering>true</filtering>
274 <include>**/log4j.properties</include>
280 <artifactId>maven-assembly-plugin</artifactId>
281 <version>2.4</version>
284 <descriptorRef>jar-with-dependencies</descriptorRef>
286 <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/lib</outputDirectory>
289 <addClasspath>true</addClasspath>
290 <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
296 <id>make-assembly</id>
297 <!-- this is used for inheritance merges -->
298 <phase>package</phase>
299 <!-- bind to the packaging phase -->
307 <groupId>org.apache.maven.plugins</groupId>
308 <artifactId>maven-compiler-plugin</artifactId>
313 <version>3.6.0</version>
316 <artifactId>maven-resources-plugin</artifactId>
317 <version>2.7</version>
320 <id>copy-docker-file</id>
321 <phase>validate</phase>
323 <goal>copy-resources</goal>
326 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
327 <overwrite>true</overwrite>
330 <directory>${basedir}/src/main/resources/docker</directory>
331 <filtering>true</filtering>
333 <include>**/*</include>
340 <id>copy-startup-script</id>
341 <phase>validate</phase>
343 <goal>copy-resources</goal>
346 <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
347 <overwrite>true</overwrite>
350 <directory>${basedir}/src/main/resources/docker</directory>
351 <filtering>true</filtering>
353 <include>startup.sh</include>
360 <id>copy-resources-2</id>
361 <phase>validate</phase>
363 <goal>copy-resources</goal>
366 <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/etc</outputDirectory>
369 <directory>${basedir}/src/main/resources</directory>
371 <include>*.properties</include>
380 <groupId>org.apache.maven.plugins</groupId>
381 <artifactId>maven-dependency-plugin</artifactId>
382 <version>2.10</version>
385 <id>copy-dependencies</id>
386 <phase>package</phase>
388 <goal>copy-dependencies</goal>
391 <outputDirectory>${project.build.directory}/opt/app/subscriber/lib</outputDirectory>
392 <overWriteReleases>false</overWriteReleases>
393 <overWriteSnapshots>false</overWriteSnapshots>
394 <overWriteIfNewer>true</overWriteIfNewer>
400 <groupId>org.apache.maven.plugins</groupId>
401 <artifactId>maven-source-plugin</artifactId>
402 <version>2.2.1</version>
405 <id>attach-sources</id>
407 <goal>jar-no-fork</goal>
413 <groupId>org.jacoco</groupId>
414 <artifactId>jacoco-maven-plugin</artifactId>
415 <version>${jacoco.version}</version>
418 <exclude>**/gen/**</exclude>
419 <exclude>**/generated-sources/**</exclude>
420 <exclude>**/yang-gen/**</exclude>
421 <exclude>**/pax/**</exclude>
426 <id>pre-unit-test</id>
428 <goal>prepare-agent</goal>
431 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
432 <propertyName>surefireArgLine</propertyName>
436 <id>post-unit-test</id>
442 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
443 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
447 <id>pre-integration-test</id>
448 <phase>pre-integration-test</phase>
450 <goal>prepare-agent</goal>
453 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
454 <propertyName>failsafeArgLine</propertyName>
458 <id>post-integration-test</id>
459 <phase>post-integration-test</phase>
464 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
465 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>