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