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