[DMaaP DR] JKD 11 migration
[dmaap/datarouter.git] / datarouter-prov / 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-prov</artifactId>
33     <packaging>jar</packaging>
34     <url>https://docs.onap.org/en/latest/submodules/dmaap/datarouter.git/docs/index.html</url>
35     <properties>
36         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
37         <docker.location>${basedir}/target/${project.artifactId}</docker.location>
38         <datarouter.prov.image.name>${docker.image.root}${project.artifactId}</datarouter.prov.image.name>
39         <sonar.exclusions>**/src/main/java/org/onap/dmaap/datarouter/reports/**,
40             src/main/java/org/onap/dmaap/datarouter/authz/impl/AuthRespSupplementImpl.java,
41             src/main/java/org/onap/dmaap/datarouter/provisioning/Main.java,
42             src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRRouteCLI.java</sonar.exclusions>
43         <sonar.language>java</sonar.language>
44         <sonar.skip>false</sonar.skip>
45     </properties>
46     <dependencies>
47         <dependency>
48             <groupId>org.apache.commons</groupId>
49             <artifactId>commons-lang3</artifactId>
50         </dependency>
51         <dependency>
52             <groupId>org.mariadb.jdbc</groupId>
53             <artifactId>mariadb-java-client</artifactId>
54             <version>2.5.0</version>
55         </dependency>
56         <dependency>
57             <groupId>org.apache.commons</groupId>
58             <artifactId>commons-dbcp2</artifactId>
59             <version>2.7.0</version>
60         </dependency>
61         <dependency>
62             <groupId>org.slf4j</groupId>
63             <artifactId>slf4j-api</artifactId>
64         </dependency>
65         <dependency>
66             <groupId>commons-codec</groupId>
67             <artifactId>commons-codec</artifactId>
68         </dependency>
69         <dependency>
70             <groupId>ch.qos.logback</groupId>
71             <artifactId>logback-classic</artifactId>
72         </dependency>
73         <dependency>
74             <groupId>ch.qos.logback</groupId>
75             <artifactId>logback-core</artifactId>
76         </dependency>
77         <dependency>
78             <groupId>org.json</groupId>
79             <artifactId>json</artifactId>
80         </dependency>
81         <dependency>
82             <groupId>com.intellij</groupId>
83             <artifactId>annotations</artifactId>
84         </dependency>
85         <dependency>
86             <groupId>javax.servlet</groupId>
87             <artifactId>javax.servlet-api</artifactId>
88         </dependency>
89         <dependency>
90             <groupId>javax.mail</groupId>
91             <artifactId>javax.mail-api</artifactId>
92         </dependency>
93         <dependency>
94             <groupId>com.att.eelf</groupId>
95             <artifactId>eelf-core</artifactId>
96             <exclusions>
97                 <exclusion>
98                     <artifactId>powermock-api-mockito</artifactId>
99                     <groupId>org.powermock</groupId>
100                 </exclusion>
101             </exclusions>
102         </dependency>
103         <dependency>
104             <groupId>org.onap.aaf.authz</groupId>
105             <artifactId>aaf-cadi-core</artifactId>
106         </dependency>
107         <dependency>
108             <groupId>org.eclipse.jetty</groupId>
109             <artifactId>jetty-server</artifactId>
110         </dependency>
111         <dependency>
112             <groupId>org.eclipse.jetty</groupId>
113             <artifactId>jetty-continuation</artifactId>
114         </dependency>
115         <dependency>
116             <groupId>org.eclipse.jetty</groupId>
117             <artifactId>jetty-util</artifactId>
118         </dependency>
119         <dependency>
120             <groupId>org.eclipse.jetty</groupId>
121             <artifactId>jetty-servlet</artifactId>
122         </dependency>
123         <dependency>
124             <groupId>org.eclipse.jetty</groupId>
125             <artifactId>jetty-http</artifactId>
126         </dependency>
127         <dependency>
128             <groupId>org.eclipse.jetty</groupId>
129             <artifactId>jetty-io</artifactId>
130         </dependency>
131         <dependency>
132             <groupId>commons-io</groupId>
133             <artifactId>commons-io</artifactId>
134         </dependency>
135         <dependency>
136             <groupId>org.apache.httpcomponents</groupId>
137             <artifactId>httpcore</artifactId>
138         </dependency>
139         <dependency>
140             <groupId>org.apache.httpcomponents</groupId>
141             <artifactId>httpclient</artifactId>
142         </dependency>
143         <dependency>
144             <groupId>org.dom4j</groupId>
145             <artifactId>dom4j</artifactId>
146             <version>2.1.1</version>
147         </dependency>
148         <dependency>
149             <groupId>org.sonatype.http-testing-harness</groupId>
150             <artifactId>junit-runner</artifactId>
151             <scope>test</scope>
152             <exclusions>
153                 <exclusion>
154                     <artifactId>powermock-reflect</artifactId>
155                     <groupId>org.powermock</groupId>
156                 </exclusion>
157                 <exclusion>
158                     <artifactId>powermock-api-mockito</artifactId>
159                     <groupId>org.powermock</groupId>
160                 </exclusion>
161                 <exclusion>
162                     <artifactId>jetty-security</artifactId>
163                     <groupId>org.eclipse.jetty</groupId>
164                 </exclusion>
165                 <exclusion>
166                     <artifactId>jsr305</artifactId>
167                     <groupId>com.google.code.findbugs</groupId>
168                 </exclusion>
169             </exclusions>
170         </dependency>
171         <dependency>
172             <groupId>junit</groupId>
173             <artifactId>junit</artifactId>
174             <scope>test</scope>
175         </dependency>
176         <dependency>
177             <groupId>org.mockito</groupId>
178             <artifactId>mockito-core</artifactId>
179             <scope>test</scope>
180         </dependency>
181         <dependency>
182             <groupId>org.powermock</groupId>
183             <artifactId>powermock-module-junit4</artifactId>
184             <scope>test</scope>
185         </dependency>
186         <dependency>
187             <groupId>org.powermock</groupId>
188             <artifactId>powermock-api-mockito2</artifactId>
189             <scope>test</scope>
190         </dependency>
191         <dependency>
192             <groupId>org.powermock</groupId>
193             <artifactId>powermock-api-support</artifactId>
194             <scope>test</scope>
195         </dependency>
196         <dependency>
197             <groupId>org.powermock</groupId>
198             <artifactId>powermock-core</artifactId>
199             <scope>test</scope>
200         </dependency>
201         <dependency>
202             <groupId>org.powermock</groupId>
203             <artifactId>powermock-module-junit4-rule</artifactId>
204         </dependency>
205         <dependency>
206             <groupId>net.bytebuddy</groupId>
207             <artifactId>byte-buddy</artifactId>
208         </dependency>
209         <dependency>
210             <groupId>net.bytebuddy</groupId>
211             <artifactId>byte-buddy-agent</artifactId>
212         </dependency>
213         <dependency>
214             <groupId>org.objenesis</groupId>
215             <artifactId>objenesis</artifactId>
216         </dependency>
217         <dependency>
218             <groupId>org.javassist</groupId>
219             <artifactId>javassist</artifactId>
220         </dependency>
221         <dependency>
222             <groupId>com.h2database</groupId>
223             <artifactId>h2</artifactId>
224             <version>1.4.197</version>
225             <scope>test</scope>
226         </dependency>
227         <dependency>
228             <groupId>org.hibernate</groupId>
229             <artifactId>hibernate-core</artifactId>
230             <version>5.4.2.Final</version>
231             <exclusions>
232                 <exclusion>
233                     <groupId>dom4j</groupId>
234                     <artifactId>dom4j</artifactId>
235                 </exclusion>
236             </exclusions>
237             <scope>test</scope>
238         </dependency>
239         <dependency>
240             <groupId>org.hamcrest</groupId>
241             <artifactId>hamcrest-all</artifactId>
242             <scope>test</scope>
243         </dependency>
244         <dependency>
245             <groupId>org.hibernate.javax.persistence</groupId>
246             <artifactId>hibernate-jpa-2.1-api</artifactId>
247             <version>1.0.2.Final</version>
248             <scope>test</scope>
249         </dependency>
250     </dependencies>
251     <profiles>
252         <profile>
253             <id>docker</id>
254             <properties>
255                 <skipTests>true</skipTests>
256             </properties>
257             <build>
258                 <plugins>
259                     <plugin>
260                         <groupId>org.codehaus.gmaven</groupId>
261                         <artifactId>gmaven-plugin</artifactId>
262                     </plugin>
263                     <plugin>
264                         <groupId>io.fabric8</groupId>
265                         <artifactId>docker-maven-plugin</artifactId>
266                         <configuration>
267                             <images>
268                                 <image>
269                                     <name>${datarouter.prov.image.name}</name>
270                                     <build>
271                                         <cleanup>try</cleanup>
272                                         <noCache>true</noCache>
273                                         <optimise>true</optimise>
274                                         <contextDir>${basedir}/target/docker-stage</contextDir>
275                                         <dockerFile>Dockerfile</dockerFile>
276                                         <tags>
277                                             <tag>${dockertag1}</tag>
278                                             <tag>${dockertag2}</tag>
279                                         </tags>
280                                     </build>
281                                 </image>
282                             </images>
283                         </configuration>
284                         <executions>
285                             <execution>
286                                 <id>generate-images</id>
287                                 <phase>install</phase>
288                                 <goals>
289                                     <goal>build</goal>
290                                 </goals>
291                             </execution>
292                             <execution>
293                                 <id>push-images</id>
294                                 <phase>deploy</phase>
295                                 <goals>
296                                     <goal>push</goal>
297                                 </goals>
298                             </execution>
299                         </executions>
300                     </plugin>
301                 </plugins>
302             </build>
303         </profile>
304     </profiles>
305     <build>
306         <finalName>datarouter-prov</finalName>
307         <resources>
308             <resource>
309                 <directory>src/main/resources</directory>
310                 <filtering>true</filtering>
311                 <includes>
312                     <include>**/*.properties</include>
313                     <include>**/logback.xml</include>
314                 </includes>
315             </resource>
316         </resources>
317         <plugins>
318             <plugin>
319                 <artifactId>maven-assembly-plugin</artifactId>
320                 <version>2.4</version>
321                 <configuration>
322                     <descriptorRefs>
323                         <descriptorRef>jar-with-dependencies</descriptorRef>
324                     </descriptorRefs>
325                     <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/lib</outputDirectory>
326                     <archive>
327                         <manifest>
328                             <addClasspath>true</addClasspath>
329                             <mainClass>org.onap.dmaap.datarouter.provisioning.ProvRunner</mainClass>
330                         </manifest>
331                     </archive>
332                 </configuration>
333                 <executions>
334                     <execution>
335                         <id>make-assembly</id>
336                         <!-- this is used for inheritance merges -->
337                         <phase>package</phase>
338                         <!-- bind to the packaging phase -->
339                         <goals>
340                             <goal>single</goal>
341                         </goals>
342                     </execution>
343                 </executions>
344             </plugin>
345             <plugin>
346                 <groupId>org.apache.maven.plugins</groupId>
347                 <artifactId>maven-compiler-plugin</artifactId>
348             </plugin>
349             <!-- Copy files to docker-stage to be included in image -->
350             <plugin>
351                 <artifactId>maven-resources-plugin</artifactId>
352                 <version>2.7</version>
353                 <executions>
354                     <execution>
355                         <id>copy-dockerfile</id>
356                         <phase>validate</phase>
357                         <goals>
358                             <goal>copy-resources</goal>
359                         </goals>
360                         <configuration>
361                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
362                             <overwrite>true</overwrite>
363                             <resources>
364                                 <resource>
365                                     <directory>${basedir}/src/main/resources/docker</directory>
366                                     <filtering>true</filtering>
367                                     <includes>
368                                         <include>Dockerfile</include>
369                                     </includes>
370                                 </resource>
371                             </resources>
372                         </configuration>
373                     </execution>
374                     <execution>
375                         <id>copy-startup-script</id>
376                         <phase>validate</phase>
377                         <goals>
378                             <goal>copy-resources</goal>
379                         </goals>
380                         <configuration>
381                             <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
382                             <overwrite>true</overwrite>
383                             <resources>
384                                 <resource>
385                                     <directory>${basedir}/src/main/resources/docker</directory>
386                                     <filtering>true</filtering>
387                                     <includes>
388                                         <include>startup.sh</include>
389                                     </includes>
390                                 </resource>
391                             </resources>
392                         </configuration>
393                     </execution>
394                     <execution>
395                         <id>copy-resources-etc</id>
396                         <phase>validate</phase>
397                         <goals>
398                             <goal>copy-resources</goal>
399                         </goals>
400                         <configuration>
401                             <outputDirectory>${basedir}/target/docker-stage/opt/app/datartr/etc</outputDirectory>
402                             <resources>
403                                 <resource>
404                                     <directory>${basedir}/src/main/resources</directory>
405                                     <includes>
406                                         <include>misc/**</include>
407                                         <include>**/**</include>
408                                     </includes>
409                                     <excludes>
410                                         <exclude>aaf/**</exclude>
411                                         <exclude>docker/**</exclude>
412                                     </excludes>
413                                 </resource>
414                             </resources>
415                         </configuration>
416                     </execution>
417                     <execution>
418                         <id>copy-aaf-props</id>
419                         <phase>validate</phase>
420                         <goals>
421                             <goal>copy-resources</goal>
422                         </goals>
423                         <configuration>
424                             <outputDirectory>${basedir}/target/docker-stage/opt/app/osaaf/local</outputDirectory>
425                             <resources>
426                                 <resource>
427                                     <directory>${basedir}/src/main/resources/aaf</directory>
428                                     <includes>
429                                         <include>**/**</include>
430                                     </includes>
431                                 </resource>
432                             </resources>
433                         </configuration>
434                     </execution>
435                 </executions>
436             </plugin>
437             <plugin>
438                 <groupId>org.apache.maven.plugins</groupId>
439                 <artifactId>maven-javadoc-plugin</artifactId>
440             </plugin>
441             <plugin>
442                 <groupId>org.apache.maven.plugins</groupId>
443                 <artifactId>maven-source-plugin</artifactId>
444             </plugin>
445             <plugin>
446                 <groupId>org.codehaus.mojo</groupId>
447                 <artifactId>cobertura-maven-plugin</artifactId>
448             </plugin>
449             <plugin>
450                 <groupId>org.jacoco</groupId>
451                 <artifactId>jacoco-maven-plugin</artifactId>
452                 <configuration>
453                     <excludes>
454                         <exclude>**/src/main/java/org/onap/dmaap/datarouter/reports/**</exclude>
455                         <exclude>src/main/java/org/onap/dmaap/datarouter/authz/impl/AuthRespSupplementImpl.java</exclude>
456                         <exclude>src/main/java/org/onap/dmaap/datarouter/provisioning/ProvRunner.java</exclude>
457                         <exclude>src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRRouteCLI.java</exclude>
458                     </excludes>
459                 </configuration>
460             </plugin>
461             <plugin>
462                 <groupId>org.codehaus.mojo</groupId>
463                 <artifactId>properties-maven-plugin</artifactId>
464             </plugin>
465         </plugins>
466     </build>
467 </project>