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