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