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