Removing latest from pom xmls
[dmaap/datarouter.git] / datarouter-subscriber / 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>1.0.7-SNAPSHOT</version>
30         <relativePath>../pom.xml</relativePath>
31     </parent>
32     <artifactId>datarouter-subscriber</artifactId>
33     <packaging>jar</packaging>
34     <name>datarouter-subscriber</name>
35     <properties>
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>
40
41         <docker.location>${basedir}/target/${artifactId}</docker.location>
42         <datarouter.prov.image.name>onap/dmaap/datarouter-subscriber</datarouter.prov.image.name>
43     </properties>
44     <dependencies>
45         <dependency>
46             <groupId>com.google.guava</groupId>
47             <artifactId>guava</artifactId>
48             <version>${google.guava.version}</version>
49         </dependency>
50         <dependency>
51             <groupId>commons-codec</groupId>
52             <artifactId>commons-codec</artifactId>
53             <version>${commons-codec.version}</version>
54         </dependency>
55         <dependency>
56             <groupId>org.eclipse.jetty</groupId>
57             <artifactId>jetty-server</artifactId>
58             <version>${jetty.version}</version>
59         </dependency>
60         <dependency>
61             <groupId>org.eclipse.jetty</groupId>
62             <artifactId>jetty-continuation</artifactId>
63             <version>${jetty.version}</version>
64         </dependency>
65         <dependency>
66             <groupId>org.eclipse.jetty</groupId>
67             <artifactId>jetty-util</artifactId>
68             <version>${jetty.version}</version>
69         </dependency>
70         <dependency>
71             <groupId>org.eclipse.jetty</groupId>
72             <artifactId>jetty-deploy</artifactId>
73             <version>${jetty.version}</version>
74         </dependency>
75         <dependency>
76             <groupId>org.eclipse.jetty</groupId>
77             <artifactId>jetty-servlet</artifactId>
78             <version>${jetty.version}</version>
79         </dependency>
80         <dependency>
81             <groupId>org.eclipse.jetty</groupId>
82             <artifactId>jetty-servlets</artifactId>
83             <version>${jetty.version}</version>
84         </dependency>
85         <dependency>
86             <groupId>org.eclipse.jetty</groupId>
87             <artifactId>jetty-http</artifactId>
88             <version>${jetty.version}</version>
89         </dependency>
90         <dependency>
91             <groupId>org.eclipse.jetty</groupId>
92             <artifactId>jetty-security</artifactId>
93             <version>${jetty.version}</version>
94         </dependency>
95         <dependency>
96             <groupId>org.eclipse.jetty</groupId>
97             <artifactId>jetty-websocket</artifactId>
98             <version>${jetty.websocket.version}</version>
99         </dependency>
100         <dependency>
101             <groupId>org.eclipse.jetty</groupId>
102             <artifactId>jetty-io</artifactId>
103             <version>${jetty.version}</version>
104         </dependency>
105         <dependency>
106             <groupId>com.thoughtworks.xstream</groupId>
107             <artifactId>xstream</artifactId>
108             <version>${thoughtworks.version}</version>
109         </dependency>
110         <dependency>
111             <groupId>ch.qos.logback</groupId>
112             <artifactId>logback-classic</artifactId>
113             <version>${qos.logback.version}</version>
114             <scope>compile</scope>
115         </dependency>
116         <dependency>
117             <groupId>ch.qos.logback</groupId>
118             <artifactId>logback-core</artifactId>
119             <version>${qos.logback.version}</version>
120             <scope>compile</scope>
121         </dependency>
122         <dependency>
123             <groupId>org.apache.httpcomponents</groupId>
124             <artifactId>httpclient</artifactId>
125             <version>4.5.3</version>
126         </dependency>
127         <dependency>
128             <groupId>org.sonatype.http-testing-harness</groupId>
129             <artifactId>junit-runner</artifactId>
130             <version>0.11</version>
131             <exclusions>
132                 <exclusion>
133                     <groupId>org.databene</groupId>
134                     <artifactId>contiperf</artifactId>
135                 </exclusion>
136             </exclusions>
137         </dependency>
138         <dependency>
139             <groupId>junit</groupId>
140             <artifactId>junit</artifactId>
141             <version>4.10</version>
142             <scope>test</scope>
143         </dependency>
144         <dependency>
145             <groupId>log4j</groupId>
146             <artifactId>log4j</artifactId>
147             <version>1.2.17</version>
148             <scope>compile</scope>
149         </dependency>
150         <dependency>
151             <groupId>org.apache.commons</groupId>
152             <artifactId>commons-io</artifactId>
153             <version>1.3.2</version>
154         </dependency>
155     </dependencies>
156     <profiles>
157         <profile>
158             <id>docker</id>
159             <properties>
160                 <skipDockerBuild>false</skipDockerBuild>
161                 <skipDockerTag>false</skipDockerTag>
162                 <skipTests>true</skipTests>
163             </properties>
164             <build>
165                 <plugins>
166                     <plugin>
167                         <groupId>com.spotify</groupId>
168                         <artifactId>docker-maven-plugin</artifactId>
169                         <version>${docker.maven.plugin.version}</version>
170                         <configuration>
171                             <imageName>${onap.nexus.dockerregistry.daily}/${datarouter.prov.image.name}</imageName>
172                             <baseImage>java:8</baseImage>
173                             <serverId>${onap.nexus.dockerregistry.daily}</serverId>
174                             <skipDockerBuild>false</skipDockerBuild>
175                             <imageTags>
176                                 <imageTag>${project.version}</imageTag>
177                             </imageTags>
178                             <forceTags>true</forceTags>
179                             <entryPoint>["/startup.sh", "start"]</entryPoint>
180                             <resources>
181                                 <resource>
182                                     <targetPath>/opt</targetPath>
183                                     <directory>${project.build.directory}/opt</directory>
184                                 </resource>
185                                 <resource>
186                                     <targetPath>/</targetPath>
187                                     <directory>${docker.location}</directory>
188                                     <include>startup.sh</include>
189                                 </resource>
190                             </resources>
191                             <runs>
192                                 <run>chmod 0700 /startup.sh</run>
193                             </runs>
194                             <exposes>
195                                 <expose>8080</expose>
196                                 <expose>8443</expose>
197                             </exposes>
198                         </configuration>
199                     </plugin>
200                 </plugins>
201             </build>
202         </profile>
203     </profiles>
204     <build>
205         <finalName>datarouter-subscriber</finalName>
206         <resources>
207             <resource>
208                 <directory>src/main/resources</directory>
209                 <filtering>true</filtering>
210                 <includes>
211                     <include>**/*.properties</include>
212                 </includes>
213             </resource>
214             <resource>
215                 <directory>src/main/resources</directory>
216                 <filtering>true</filtering>
217                 <includes>
218                     <include>**/subscriber.properties</include>
219                 </includes>
220             </resource>
221             <resource>
222                 <directory>src/main/resources</directory>
223                 <filtering>true</filtering>
224                 <includes>
225                     <include>**/log4j.properties</include>
226                 </includes>
227             </resource>
228             <resource>
229                 <directory>src/test/resources</directory>
230                 <filtering>true</filtering>
231                 <includes>
232                     <include>**/log4j.properties</include>
233                 </includes>
234             </resource>
235         </resources>
236         <plugins>
237             <plugin>
238                 <artifactId>maven-assembly-plugin</artifactId>
239                 <version>2.4</version>
240                 <configuration>
241                     <descriptorRefs>
242                         <descriptorRef>jar-with-dependencies</descriptorRef>
243                     </descriptorRefs>
244                     <outputDirectory>${basedir}/target/opt/app/subscriber/lib</outputDirectory>
245                     <archive>
246                         <manifest>
247                             <addClasspath>true</addClasspath>
248                             <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
249                         </manifest>
250                     </archive>
251                 </configuration>
252                 <executions>
253                     <execution>
254                         <id>make-assembly</id>
255                         <!-- this is used for inheritance merges -->
256                         <phase>package</phase>
257                         <!-- bind to the packaging phase -->
258                         <goals>
259                             <goal>single</goal>
260                         </goals>
261                     </execution>
262                 </executions>
263             </plugin>
264             <plugin>
265                 <groupId>org.apache.maven.plugins</groupId>
266                 <artifactId>maven-compiler-plugin</artifactId>
267                 <configuration>
268                     <source>1.8</source>
269                     <target>1.8</target>
270                 </configuration>
271                 <version>3.6.0</version>
272             </plugin>
273             <plugin>
274                 <artifactId>maven-resources-plugin</artifactId>
275                 <version>2.7</version>
276                 <executions>
277                     <execution>
278                         <id>copy-docker-file</id>
279                         <phase>package</phase>
280                         <goals>
281                             <goal>copy-resources</goal>
282                         </goals>
283                         <configuration>
284                             <outputDirectory>${docker.location}</outputDirectory>
285                             <overwrite>true</overwrite>
286                             <resources>
287                                 <resource>
288                                     <directory>${basedir}/src/main/resources/docker</directory>
289                                     <filtering>true</filtering>
290                                     <includes>
291                                         <include>**/*</include>
292                                     </includes>
293                                 </resource>
294                             </resources>
295                         </configuration>
296                     </execution>
297                     <execution>
298                         <id>copy-resources-1</id>
299                         <phase>validate</phase>
300                         <goals>
301                             <goal>copy-resources</goal>
302                         </goals>
303                         <configuration>
304                             <outputDirectory>${basedir}/target/opt/app/subscriber/lib</outputDirectory>
305                             <resources>
306                                 <resource>
307                                     <directory>${project.basedir}/src/main/resources</directory>
308                                     <includes>
309                                         <include>**/*.jar</include>
310                                     </includes>
311                                 </resource>
312                             </resources>
313                         </configuration>
314                     </execution>
315                     <execution>
316                         <id>copy-resources-2</id>
317                         <phase>validate</phase>
318                         <goals>
319                             <goal>copy-resources</goal>
320                         </goals>
321                         <configuration>
322                             <outputDirectory>${basedir}/target/opt/app/subscriber/etc</outputDirectory>
323                             <resources>
324                                 <resource>
325                                     <directory>${basedir}/src/main/resources</directory>
326                                     <includes>
327                                         <include>*.properties</include>
328                                     </includes>
329                                 </resource>
330                             </resources>
331                         </configuration>
332                     </execution>
333                 </executions>
334             </plugin>
335             <plugin>
336                 <groupId>org.apache.maven.plugins</groupId>
337                 <artifactId>maven-dependency-plugin</artifactId>
338                 <version>2.10</version>
339                 <executions>
340                     <execution>
341                         <id>copy-dependencies</id>
342                         <phase>package</phase>
343                         <goals>
344                             <goal>copy-dependencies</goal>
345                         </goals>
346                         <configuration>
347                             <outputDirectory>${project.build.directory}/opt/app/subscriber/lib</outputDirectory>
348                             <overWriteReleases>false</overWriteReleases>
349                             <overWriteSnapshots>false</overWriteSnapshots>
350                             <overWriteIfNewer>true</overWriteIfNewer>
351                         </configuration>
352                     </execution>
353                 </executions>
354             </plugin>
355             <plugin>
356                 <groupId>org.apache.maven.plugins</groupId>
357                 <artifactId>maven-source-plugin</artifactId>
358                 <version>2.2.1</version>
359                 <executions>
360                     <execution>
361                         <id>attach-sources</id>
362                         <goals>
363                             <goal>jar-no-fork</goal>
364                         </goals>
365                     </execution>
366                 </executions>
367             </plugin>
368             <plugin>
369                 <groupId>org.jacoco</groupId>
370                 <artifactId>jacoco-maven-plugin</artifactId>
371                 <version>${jacoco.version}</version>
372                 <configuration>
373                     <excludes>
374                         <exclude>**/gen/**</exclude>
375                         <exclude>**/generated-sources/**</exclude>
376                         <exclude>**/yang-gen/**</exclude>
377                         <exclude>**/pax/**</exclude>
378                     </excludes>
379                 </configuration>
380                 <executions>
381                     <execution>
382                         <id>pre-unit-test</id>
383                         <goals>
384                             <goal>prepare-agent</goal>
385                         </goals>
386                         <configuration>
387                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
388                             <propertyName>surefireArgLine</propertyName>
389                         </configuration>
390                     </execution>
391                     <execution>
392                         <id>post-unit-test</id>
393                         <phase>test</phase>
394                         <goals>
395                             <goal>report</goal>
396                         </goals>
397                         <configuration>
398                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
399                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
400                         </configuration>
401                     </execution>
402                     <execution>
403                         <id>pre-integration-test</id>
404                         <phase>pre-integration-test</phase>
405                         <goals>
406                             <goal>prepare-agent</goal>
407                         </goals>
408                         <configuration>
409                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
410                             <propertyName>failsafeArgLine</propertyName>
411                         </configuration>
412                     </execution>
413                     <execution>
414                         <id>post-integration-test</id>
415                         <phase>post-integration-test</phase>
416                         <goals>
417                             <goal>report</goal>
418                         </goals>
419                         <configuration>
420                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
421                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
422                         </configuration>
423                     </execution>
424                 </executions>
425             </plugin>
426         </plugins>
427     </build>
428 </project>