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