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