[DMaaP DR] JKD 11 migration
[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>${revision}</version>
30         <relativePath>../pom.xml</relativePath>
31     </parent>
32     <artifactId>datarouter-subscriber</artifactId>
33     <packaging>jar</packaging>
34     <properties>
35         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
36         <docker.location>${basedir}/target/${project.artifactId}</docker.location>
37         <datarouter.sub.image.name>${docker.image.root}${project.artifactId}</datarouter.sub.image.name>
38         <sonar.exclusions>src/main/java/org/onap/dmaap/datarouter/subscriber/**</sonar.exclusions>
39         <sonar.language>java</sonar.language>
40         <sonar.skip>false</sonar.skip>
41     </properties>
42     <dependencies>
43         <dependency>
44             <groupId>commons-codec</groupId>
45             <artifactId>commons-codec</artifactId>
46         </dependency>
47         <dependency>
48             <groupId>javax.servlet</groupId>
49             <artifactId>javax.servlet-api</artifactId>
50         </dependency>
51         <dependency>
52             <groupId>org.eclipse.jetty</groupId>
53             <artifactId>jetty-server</artifactId>
54         </dependency>
55         <dependency>
56             <groupId>org.eclipse.jetty</groupId>
57             <artifactId>jetty-util</artifactId>
58         </dependency>
59         <dependency>
60             <groupId>org.eclipse.jetty</groupId>
61             <artifactId>jetty-servlet</artifactId>
62         </dependency>
63         <dependency>
64             <groupId>org.eclipse.jetty</groupId>
65             <artifactId>jetty-http</artifactId>
66         </dependency>
67         <dependency>
68             <groupId>org.sonatype.http-testing-harness</groupId>
69             <artifactId>junit-runner</artifactId>
70             <exclusions>
71                 <exclusion>
72                     <artifactId>powermock-reflect</artifactId>
73                     <groupId>org.powermock</groupId>
74                 </exclusion>
75                 <exclusion>
76                     <artifactId>powermock-api-mockito</artifactId>
77                     <groupId>org.powermock</groupId>
78                 </exclusion>
79                 <exclusion>
80                     <artifactId>jetty-security</artifactId>
81                     <groupId>org.eclipse.jetty</groupId>
82                 </exclusion>
83                 <exclusion>
84                     <artifactId>jsr305</artifactId>
85                     <groupId>com.google.code.findbugs</groupId>
86                 </exclusion>
87             </exclusions>
88         </dependency>
89         <dependency>
90             <groupId>junit</groupId>
91             <artifactId>junit</artifactId>
92             <scope>test</scope>
93         </dependency>
94         <dependency>
95             <groupId>org.mockito</groupId>
96             <artifactId>mockito-core</artifactId>
97             <scope>test</scope>
98         </dependency>
99         <dependency>
100             <groupId>org.powermock</groupId>
101             <artifactId>powermock-module-junit4</artifactId>
102             <scope>test</scope>
103         </dependency>
104         <dependency>
105             <groupId>org.powermock</groupId>
106             <artifactId>powermock-api-mockito2</artifactId>
107             <scope>test</scope>
108         </dependency>
109         <dependency>
110             <groupId>org.powermock</groupId>
111             <artifactId>powermock-api-support</artifactId>
112             <scope>test</scope>
113         </dependency>
114         <dependency>
115             <groupId>org.powermock</groupId>
116             <artifactId>powermock-core</artifactId>
117             <scope>test</scope>
118         </dependency>
119         <dependency>
120             <groupId>org.powermock</groupId>
121             <artifactId>powermock-module-junit4-rule</artifactId>
122         </dependency>
123         <dependency>
124             <groupId>net.bytebuddy</groupId>
125             <artifactId>byte-buddy</artifactId>
126         </dependency>
127         <dependency>
128             <groupId>net.bytebuddy</groupId>
129             <artifactId>byte-buddy-agent</artifactId>
130         </dependency>
131         <dependency>
132             <groupId>org.objenesis</groupId>
133             <artifactId>objenesis</artifactId>
134         </dependency>
135         <dependency>
136             <groupId>org.javassist</groupId>
137             <artifactId>javassist</artifactId>
138         </dependency>
139         <dependency>
140             <groupId>commons-io</groupId>
141             <artifactId>commons-io</artifactId>
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     </dependencies>
150     <profiles>
151         <profile>
152             <id>docker</id>
153             <properties>
154                 <skipTests>true</skipTests>
155             </properties>
156             <build>
157                 <plugins>
158                     <plugin>
159                         <groupId>org.codehaus.gmaven</groupId>
160                         <artifactId>gmaven-plugin</artifactId>
161                     </plugin>
162                     <plugin>
163                         <groupId>io.fabric8</groupId>
164                         <artifactId>docker-maven-plugin</artifactId>
165                         <configuration>
166                             <images>
167                                 <image>
168                                     <name>${datarouter.sub.image.name}</name>
169                                     <build>
170                                         <cleanup>try</cleanup>
171                                         <noCache>true</noCache>
172                                         <optimise>true</optimise>
173                                         <contextDir>${basedir}/target/docker-stage</contextDir>
174                                         <dockerFile>Dockerfile</dockerFile>
175                                         <tags>
176                                             <tag>${dockertag1}</tag>
177                                             <tag>${dockertag2}</tag>
178                                         </tags>
179                                     </build>
180                                 </image>
181                             </images>
182                         </configuration>
183                         <executions>
184                             <execution>
185                                 <id>generate-images</id>
186                                 <phase>install</phase>
187                                 <goals>
188                                     <goal>build</goal>
189                                 </goals>
190                             </execution>
191                             <execution>
192                                 <id>push-images</id>
193                                 <phase>deploy</phase>
194                                 <goals>
195                                     <goal>push</goal>
196                                 </goals>
197                             </execution>
198                         </executions>
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         </resources>
215         <plugins>
216             <plugin>
217                 <artifactId>maven-assembly-plugin</artifactId>
218                 <version>2.4</version>
219                 <configuration>
220                     <descriptorRefs>
221                         <descriptorRef>jar-with-dependencies</descriptorRef>
222                     </descriptorRefs>
223                     <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/lib</outputDirectory>
224                     <archive>
225                         <manifest>
226                             <addClasspath>true</addClasspath>
227                             <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
228                         </manifest>
229                     </archive>
230                 </configuration>
231                 <executions>
232                     <execution>
233                         <id>make-assembly</id>
234                         <!-- this is used for inheritance merges -->
235                         <phase>package</phase>
236                         <!-- bind to the packaging phase -->
237                         <goals>
238                             <goal>single</goal>
239                         </goals>
240                     </execution>
241                 </executions>
242             </plugin>
243             <plugin>
244                 <groupId>org.apache.maven.plugins</groupId>
245                 <artifactId>maven-compiler-plugin</artifactId>
246             </plugin>
247             <plugin>
248                 <artifactId>maven-resources-plugin</artifactId>
249                 <version>2.7</version>
250                 <executions>
251                     <execution>
252                         <id>copy-docker-file</id>
253                         <phase>validate</phase>
254                         <goals>
255                             <goal>copy-resources</goal>
256                         </goals>
257                         <configuration>
258                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
259                             <overwrite>true</overwrite>
260                             <resources>
261                                 <resource>
262                                     <directory>${basedir}/src/main/resources/docker</directory>
263                                     <filtering>true</filtering>
264                                     <includes>
265                                         <include>Dockerfile</include>
266                                     </includes>
267                                 </resource>
268                             </resources>
269                         </configuration>
270                     </execution>
271                     <execution>
272                         <id>copy-startup-script</id>
273                         <phase>validate</phase>
274                         <goals>
275                             <goal>copy-resources</goal>
276                         </goals>
277                         <configuration>
278                             <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
279                             <overwrite>true</overwrite>
280                             <resources>
281                                 <resource>
282                                     <directory>${basedir}/src/main/resources/docker</directory>
283                                     <filtering>true</filtering>
284                                     <includes>
285                                         <include>startup.sh</include>
286                                     </includes>
287                                 </resource>
288                             </resources>
289                         </configuration>
290                     </execution>
291                     <execution>
292                         <id>copy-resources-2</id>
293                         <phase>validate</phase>
294                         <goals>
295                             <goal>copy-resources</goal>
296                         </goals>
297                         <configuration>
298                             <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/etc</outputDirectory>
299                             <resources>
300                                 <resource>
301                                     <directory>${basedir}/src/main/resources</directory>
302                                     <includes>
303                                         <include>*.properties</include>
304                                     </includes>
305                                 </resource>
306                             </resources>
307                         </configuration>
308                     </execution>
309                 </executions>
310             </plugin>
311             <plugin>
312                 <groupId>org.apache.maven.plugins</groupId>
313                 <artifactId>maven-source-plugin</artifactId>
314             </plugin>
315             <plugin>
316                 <groupId>org.jacoco</groupId>
317                 <artifactId>jacoco-maven-plugin</artifactId>
318                   <configuration>
319                     <excludes>
320                       <exclude>src/main/java/org/onap/dmaap/datarouter/subscriber/**</exclude>
321                     </excludes>
322                   </configuration>
323             </plugin>
324             <plugin>
325                 <groupId>org.codehaus.mojo</groupId>
326                 <artifactId>properties-maven-plugin</artifactId>
327             </plugin>
328         </plugins>
329     </build>
330 </project>