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