Renew AAF certs for DMaaP DR - Casablanca
[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.8-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}:${project.version}</imageName>
172                             <baseImage>java:8</baseImage>
173                             <serverId>${onap.nexus.dockerregistry.daily}</serverId>
174                             <skipDockerBuild>false</skipDockerBuild>
175                             <forceTags>true</forceTags>
176                             <entryPoint>["/startup.sh", "start"]</entryPoint>
177                             <resources>
178                                 <resource>
179                                     <targetPath>/opt</targetPath>
180                                     <directory>${project.build.directory}/opt</directory>
181                                 </resource>
182                                 <resource>
183                                     <targetPath>/</targetPath>
184                                     <directory>${docker.location}</directory>
185                                     <include>startup.sh</include>
186                                 </resource>
187                             </resources>
188                             <runs>
189                                 <run>chmod 0700 /startup.sh</run>
190                             </runs>
191                             <exposes>
192                                 <expose>8080</expose>
193                                 <expose>8443</expose>
194                             </exposes>
195                         </configuration>
196                     </plugin>
197                 </plugins>
198             </build>
199         </profile>
200     </profiles>
201     <build>
202         <finalName>datarouter-subscriber</finalName>
203         <resources>
204             <resource>
205                 <directory>src/main/resources</directory>
206                 <filtering>true</filtering>
207                 <includes>
208                     <include>**/*.properties</include>
209                 </includes>
210             </resource>
211             <resource>
212                 <directory>src/main/resources</directory>
213                 <filtering>true</filtering>
214                 <includes>
215                     <include>**/subscriber.properties</include>
216                 </includes>
217             </resource>
218             <resource>
219                 <directory>src/main/resources</directory>
220                 <filtering>true</filtering>
221                 <includes>
222                     <include>**/log4j.properties</include>
223                 </includes>
224             </resource>
225             <resource>
226                 <directory>src/test/resources</directory>
227                 <filtering>true</filtering>
228                 <includes>
229                     <include>**/log4j.properties</include>
230                 </includes>
231             </resource>
232         </resources>
233         <plugins>
234             <plugin>
235                 <artifactId>maven-assembly-plugin</artifactId>
236                 <version>2.4</version>
237                 <configuration>
238                     <descriptorRefs>
239                         <descriptorRef>jar-with-dependencies</descriptorRef>
240                     </descriptorRefs>
241                     <outputDirectory>${basedir}/target/opt/app/subscriber/lib</outputDirectory>
242                     <archive>
243                         <manifest>
244                             <addClasspath>true</addClasspath>
245                             <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
246                         </manifest>
247                     </archive>
248                 </configuration>
249                 <executions>
250                     <execution>
251                         <id>make-assembly</id>
252                         <!-- this is used for inheritance merges -->
253                         <phase>package</phase>
254                         <!-- bind to the packaging phase -->
255                         <goals>
256                             <goal>single</goal>
257                         </goals>
258                     </execution>
259                 </executions>
260             </plugin>
261             <plugin>
262                 <groupId>org.apache.maven.plugins</groupId>
263                 <artifactId>maven-compiler-plugin</artifactId>
264                 <configuration>
265                     <source>1.8</source>
266                     <target>1.8</target>
267                 </configuration>
268                 <version>3.6.0</version>
269             </plugin>
270             <plugin>
271                 <artifactId>maven-resources-plugin</artifactId>
272                 <version>2.7</version>
273                 <executions>
274                     <execution>
275                         <id>copy-docker-file</id>
276                         <phase>package</phase>
277                         <goals>
278                             <goal>copy-resources</goal>
279                         </goals>
280                         <configuration>
281                             <outputDirectory>${docker.location}</outputDirectory>
282                             <overwrite>true</overwrite>
283                             <resources>
284                                 <resource>
285                                     <directory>${basedir}/src/main/resources/docker</directory>
286                                     <filtering>true</filtering>
287                                     <includes>
288                                         <include>**/*</include>
289                                     </includes>
290                                 </resource>
291                             </resources>
292                         </configuration>
293                     </execution>
294                     <execution>
295                         <id>copy-resources-1</id>
296                         <phase>validate</phase>
297                         <goals>
298                             <goal>copy-resources</goal>
299                         </goals>
300                         <configuration>
301                             <outputDirectory>${basedir}/target/opt/app/subscriber/lib</outputDirectory>
302                             <resources>
303                                 <resource>
304                                     <directory>${project.basedir}/src/main/resources</directory>
305                                     <includes>
306                                         <include>**/*.jar</include>
307                                     </includes>
308                                 </resource>
309                             </resources>
310                         </configuration>
311                     </execution>
312                     <execution>
313                         <id>copy-resources-2</id>
314                         <phase>validate</phase>
315                         <goals>
316                             <goal>copy-resources</goal>
317                         </goals>
318                         <configuration>
319                             <outputDirectory>${basedir}/target/opt/app/subscriber/etc</outputDirectory>
320                             <resources>
321                                 <resource>
322                                     <directory>${basedir}/src/main/resources</directory>
323                                     <includes>
324                                         <include>*.properties</include>
325                                     </includes>
326                                 </resource>
327                             </resources>
328                         </configuration>
329                     </execution>
330                 </executions>
331             </plugin>
332             <plugin>
333                 <groupId>org.apache.maven.plugins</groupId>
334                 <artifactId>maven-dependency-plugin</artifactId>
335                 <version>2.10</version>
336                 <executions>
337                     <execution>
338                         <id>copy-dependencies</id>
339                         <phase>package</phase>
340                         <goals>
341                             <goal>copy-dependencies</goal>
342                         </goals>
343                         <configuration>
344                             <outputDirectory>${project.build.directory}/opt/app/subscriber/lib</outputDirectory>
345                             <overWriteReleases>false</overWriteReleases>
346                             <overWriteSnapshots>false</overWriteSnapshots>
347                             <overWriteIfNewer>true</overWriteIfNewer>
348                         </configuration>
349                     </execution>
350                 </executions>
351             </plugin>
352             <plugin>
353                 <groupId>org.apache.maven.plugins</groupId>
354                 <artifactId>maven-source-plugin</artifactId>
355                 <version>2.2.1</version>
356                 <executions>
357                     <execution>
358                         <id>attach-sources</id>
359                         <goals>
360                             <goal>jar-no-fork</goal>
361                         </goals>
362                     </execution>
363                 </executions>
364             </plugin>
365             <plugin>
366                 <groupId>org.jacoco</groupId>
367                 <artifactId>jacoco-maven-plugin</artifactId>
368                 <version>${jacoco.version}</version>
369                 <configuration>
370                     <excludes>
371                         <exclude>**/gen/**</exclude>
372                         <exclude>**/generated-sources/**</exclude>
373                         <exclude>**/yang-gen/**</exclude>
374                         <exclude>**/pax/**</exclude>
375                     </excludes>
376                 </configuration>
377                 <executions>
378                     <execution>
379                         <id>pre-unit-test</id>
380                         <goals>
381                             <goal>prepare-agent</goal>
382                         </goals>
383                         <configuration>
384                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
385                             <propertyName>surefireArgLine</propertyName>
386                         </configuration>
387                     </execution>
388                     <execution>
389                         <id>post-unit-test</id>
390                         <phase>test</phase>
391                         <goals>
392                             <goal>report</goal>
393                         </goals>
394                         <configuration>
395                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
396                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
397                         </configuration>
398                     </execution>
399                     <execution>
400                         <id>pre-integration-test</id>
401                         <phase>pre-integration-test</phase>
402                         <goals>
403                             <goal>prepare-agent</goal>
404                         </goals>
405                         <configuration>
406                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
407                             <propertyName>failsafeArgLine</propertyName>
408                         </configuration>
409                     </execution>
410                     <execution>
411                         <id>post-integration-test</id>
412                         <phase>post-integration-test</phase>
413                         <goals>
414                             <goal>report</goal>
415                         </goals>
416                         <configuration>
417                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
418                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
419                         </configuration>
420                     </execution>
421                 </executions>
422             </plugin>
423         </plugins>
424     </build>
425 </project>