87b82f1d0dbb6a04bec5b3bfbb95d1241d840e25
[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   * ===========================================================================
7   * Licensed under the Apache License, Version 2.0 (the "License");
8   * you may not use this file except in compliance with the License.
9   * You may obtain a copy of the License at
10   *
11    *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13    * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * ============LICENSE_END====================================================
19   *
20   * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21   *
22 -->
23 <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">
24     <modelVersion>4.0.0</modelVersion>
25     <parent>
26         <groupId>org.onap.dmaap.datarouter</groupId>
27         <artifactId>parent</artifactId>
28         <version>1.0.2-SNAPSHOT</version>
29         <relativePath>../pom.xml</relativePath>
30     </parent>
31     <artifactId>datarouter-subscriber</artifactId>
32     <packaging>jar</packaging>
33     <name>datarouter-subscriber</name>
34     <properties>
35         <sonar.language>java</sonar.language>
36         <sonar.skip>false</sonar.skip>
37         <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
38         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
39
40         <docker.location>${basedir}/target/${artifactId}</docker.location>
41         <datarouter.prov.image.name>onap/dmaap/datarouter-subscriber</datarouter.prov.image.name>
42     </properties>
43     <dependencies>
44         <dependency>
45             <groupId>com.google.guava</groupId>
46             <artifactId>guava</artifactId>
47             <version>${google.guava.version}</version>
48         </dependency>
49         <dependency>
50             <groupId>commons-codec</groupId>
51             <artifactId>commons-codec</artifactId>
52             <version>${commons-codec.version}</version>
53         </dependency>
54         <dependency>
55             <groupId>org.eclipse.jetty</groupId>
56             <artifactId>jetty-server</artifactId>
57             <version>${jetty.version}</version>
58         </dependency>
59         <dependency>
60             <groupId>org.eclipse.jetty</groupId>
61             <artifactId>jetty-continuation</artifactId>
62             <version>${jetty.version}</version>
63         </dependency>
64         <dependency>
65             <groupId>org.eclipse.jetty</groupId>
66             <artifactId>jetty-util</artifactId>
67             <version>${jetty.version}</version>
68         </dependency>
69         <dependency>
70             <groupId>org.eclipse.jetty</groupId>
71             <artifactId>jetty-deploy</artifactId>
72             <version>${jetty.version}</version>
73         </dependency>
74         <dependency>
75             <groupId>org.eclipse.jetty</groupId>
76             <artifactId>jetty-servlet</artifactId>
77             <version>${jetty.version}</version>
78         </dependency>
79         <dependency>
80             <groupId>org.eclipse.jetty</groupId>
81             <artifactId>jetty-servlets</artifactId>
82             <version>${jetty.version}</version>
83         </dependency>
84         <dependency>
85             <groupId>org.eclipse.jetty</groupId>
86             <artifactId>jetty-http</artifactId>
87             <version>${jetty.version}</version>
88         </dependency>
89         <dependency>
90             <groupId>org.eclipse.jetty</groupId>
91             <artifactId>jetty-security</artifactId>
92             <version>${jetty.version}</version>
93         </dependency>
94         <dependency>
95             <groupId>org.eclipse.jetty</groupId>
96             <artifactId>jetty-websocket</artifactId>
97             <version>${jetty.websocket.version}</version>
98         </dependency>
99         <dependency>
100             <groupId>org.eclipse.jetty</groupId>
101             <artifactId>jetty-io</artifactId>
102             <version>${jetty.version}</version>
103         </dependency>
104         <dependency>
105             <groupId>com.thoughtworks.xstream</groupId>
106             <artifactId>xstream</artifactId>
107             <version>${thoughtworks.version}</version>
108         </dependency>
109         <dependency>
110             <groupId>ch.qos.logback</groupId>
111             <artifactId>logback-classic</artifactId>
112             <version>${qos.logback.version}</version>
113             <scope>compile</scope>
114         </dependency>
115         <dependency>
116             <groupId>ch.qos.logback</groupId>
117             <artifactId>logback-core</artifactId>
118             <version>${qos.logback.version}</version>
119             <scope>compile</scope>
120         </dependency>
121         <dependency>
122             <groupId>org.apache.httpcomponents</groupId>
123             <artifactId>httpclient</artifactId>
124             <version>4.5.3</version>
125         </dependency>
126         <dependency>
127             <groupId>org.sonatype.http-testing-harness</groupId>
128             <artifactId>junit-runner</artifactId>
129             <version>0.11</version>
130             <exclusions>
131                 <exclusion>
132                     <groupId>org.databene</groupId>
133                     <artifactId>contiperf</artifactId>
134                 </exclusion>
135             </exclusions>
136         </dependency>
137         <dependency>
138             <groupId>junit</groupId>
139             <artifactId>junit</artifactId>
140             <version>4.10</version>
141             <scope>test</scope>
142         </dependency>
143         <dependency>
144             <groupId>log4j</groupId>
145             <artifactId>log4j</artifactId>
146             <version>1.2.17</version>
147             <scope>compile</scope>
148         </dependency>
149         <dependency>
150             <groupId>org.apache.commons</groupId>
151             <artifactId>commons-io</artifactId>
152             <version>1.3.2</version>
153         </dependency>
154     </dependencies>
155     <profiles>
156         <profile>
157             <id>docker</id>
158             <properties>
159                 <skipDockerBuild>false</skipDockerBuild>
160                 <skipDockerTag>false</skipDockerTag>
161                 <skipTests>true</skipTests>
162             </properties>
163             <build>
164                 <plugins>
165                     <plugin>
166                         <groupId>com.spotify</groupId>
167                         <artifactId>docker-maven-plugin</artifactId>
168                         <version>1.0.0</version>
169                         <configuration>
170                             <imageName>${onap.nexus.dockerregistry.daily}/${datarouter.prov.image.name}</imageName>
171                             <dockerDirectory>${docker.location}</dockerDirectory>
172                             <serverId>${onap.nexus.dockerregistry.daily}</serverId>
173                             <skipDockerBuild>false</skipDockerBuild>
174                             <imageTags>
175                                 <imageTag>${project.version}</imageTag>
176                                 <imageTag>latest</imageTag>
177                             </imageTags>
178                             <forceTags>true</forceTags>
179                             <resources>
180                                 <resource>
181                                     <targetPath>/</targetPath>
182                                     <directory>${project.basedir}</directory>
183                                     <excludes>
184                                         <exclude>target/**/*</exclude>
185                                         <exclude>pom.xml</exclude>
186                                     </excludes>
187                                 </resource>
188
189                                 <resource>
190                                     <targetPath>/</targetPath>
191                                     <directory>${project.build.directory}</directory>
192                                     <include>**/**</include>
193                                 </resource>
194                             </resources>
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>