blob: 2d97b175275c669645b54729402facda2dee0228 [file] [log] [blame]
Fiachra Corcoran19620eb2018-08-27 17:59:42 +01001<!--
2 ============LICENSE_START==================================================
3 * org.onap.dmaap
4 * ===========================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
Piotr Darosz5a410372018-10-03 14:31:25 +02006 * Modifications Copyright (C) 2018 Nokia. All rights reserved.
Fiachra Corcoran19620eb2018-08-27 17:59:42 +01007 * ===========================================================================
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>
efiacor1c11ab82019-04-09 13:52:17 +000029 <version>${revision}</version>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010030 <relativePath>../pom.xml</relativePath>
31 </parent>
32 <artifactId>datarouter-subscriber</artifactId>
33 <packaging>jar</packaging>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010034 <properties>
efiacor1c11ab82019-04-09 13:52:17 +000035 <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>
efiacorf20778f2019-07-23 16:22:03 +000038 <sonar.exclusions>src/main/java/org/onap/dmaap/datarouter/subscriber/**</sonar.exclusions>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010039 <sonar.language>java</sonar.language>
40 <sonar.skip>false</sonar.skip>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010041 </properties>
42 <dependencies>
43 <dependency>
edepaul12c71a52018-09-07 16:27:01 +010044 <groupId>commons-codec</groupId>
45 <artifactId>commons-codec</artifactId>
efiacor1c11ab82019-04-09 13:52:17 +000046 </dependency>
47 <dependency>
efiacor5906de22020-04-16 14:59:07 +010048 <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>
efiacor1c11ab82019-04-09 13:52:17 +000056 <groupId>javax.servlet</groupId>
57 <artifactId>javax.servlet-api</artifactId>
edepaul12c71a52018-09-07 16:27:01 +010058 </dependency>
59 <dependency>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010060 <groupId>org.eclipse.jetty</groupId>
61 <artifactId>jetty-server</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010062 </dependency>
63 <dependency>
64 <groupId>org.eclipse.jetty</groupId>
65 <artifactId>jetty-util</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010066 </dependency>
67 <dependency>
68 <groupId>org.eclipse.jetty</groupId>
69 <artifactId>jetty-servlet</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010070 </dependency>
71 <dependency>
72 <groupId>org.eclipse.jetty</groupId>
73 <artifactId>jetty-http</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010074 </dependency>
75 <dependency>
76 <groupId>org.sonatype.http-testing-harness</groupId>
77 <artifactId>junit-runner</artifactId>
efiacor8552e042020-04-04 17:51:53 +010078 <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>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010096 </dependency>
97 <dependency>
98 <groupId>junit</groupId>
99 <artifactId>junit</artifactId>
efiacor8552e042020-04-04 17:51:53 +0100100 <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>
efiacor1c11ab82019-04-09 13:52:17 +0000146 </dependency>
147 <dependency>
148 <groupId>commons-io</groupId>
149 <artifactId>commons-io</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100150 </dependency>
151 <dependency>
efiacor5906de22020-04-16 14:59:07 +0100152 <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>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100160 </dependency>
161 </dependencies>
162 <profiles>
163 <profile>
164 <id>docker</id>
165 <properties>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100166 <skipTests>true</skipTests>
167 </properties>
168 <build>
169 <plugins>
170 <plugin>
efiacor1c11ab82019-04-09 13:52:17 +0000171 <groupId>org.codehaus.gmaven</groupId>
172 <artifactId>gmaven-plugin</artifactId>
sandovalfrefad4612019-03-04 09:31:59 -0500173 </plugin>
174 <plugin>
175 <groupId>io.fabric8</groupId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100176 <artifactId>docker-maven-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100177 <configuration>
sandovalfrefad4612019-03-04 09:31:59 -0500178 <images>
179 <image>
efiacor1c11ab82019-04-09 13:52:17 +0000180 <name>${datarouter.sub.image.name}</name>
sandovalfrefad4612019-03-04 09:31:59 -0500181 <build>
182 <cleanup>try</cleanup>
efiacord20d5f52020-02-27 16:46:20 +0000183 <noCache>true</noCache>
184 <optimise>true</optimise>
185 <contextDir>${basedir}/target/docker-stage</contextDir>
sandovalfrefad4612019-03-04 09:31:59 -0500186 <dockerFile>Dockerfile</dockerFile>
187 <tags>
188 <tag>${dockertag1}</tag>
189 <tag>${dockertag2}</tag>
190 </tags>
191 </build>
192 </image>
193 </images>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100194 </configuration>
efiacor1c11ab82019-04-09 13:52:17 +0000195 <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>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100211 </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>
efiacor5906de22020-04-16 14:59:07 +0100224 <include>**/logback.xml</include>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100225 </includes>
226 </resource>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100227 </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>
sandovalfrefad4612019-03-04 09:31:59 -0500236 <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/lib</outputDirectory>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100237 <archive>
238 <manifest>
239 <addClasspath>true</addClasspath>
Fiachra Corcoranaa988a22018-08-30 00:43:55 +0100240 <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100241 </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>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100259 </plugin>
260 <plugin>
261 <artifactId>maven-resources-plugin</artifactId>
262 <version>2.7</version>
263 <executions>
264 <execution>
265 <id>copy-docker-file</id>
sandovalfrefad4612019-03-04 09:31:59 -0500266 <phase>validate</phase>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100267 <goals>
268 <goal>copy-resources</goal>
269 </goals>
270 <configuration>
sandovalfrefad4612019-03-04 09:31:59 -0500271 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100272 <overwrite>true</overwrite>
273 <resources>
274 <resource>
275 <directory>${basedir}/src/main/resources/docker</directory>
276 <filtering>true</filtering>
277 <includes>
efiacor1ccd9c32019-10-08 16:24:28 +0100278 <include>Dockerfile</include>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100279 </includes>
280 </resource>
281 </resources>
282 </configuration>
283 </execution>
284 <execution>
sandovalfrefad4612019-03-04 09:31:59 -0500285 <id>copy-startup-script</id>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100286 <phase>validate</phase>
287 <goals>
288 <goal>copy-resources</goal>
289 </goals>
290 <configuration>
sandovalfrefad4612019-03-04 09:31:59 -0500291 <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
292 <overwrite>true</overwrite>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100293 <resources>
294 <resource>
sandovalfrefad4612019-03-04 09:31:59 -0500295 <directory>${basedir}/src/main/resources/docker</directory>
296 <filtering>true</filtering>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100297 <includes>
sandovalfrefad4612019-03-04 09:31:59 -0500298 <include>startup.sh</include>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100299 </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>
sandovalfrefad4612019-03-04 09:31:59 -0500311 <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/etc</outputDirectory>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100312 <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>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100326 <artifactId>maven-source-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100327 </plugin>
328 <plugin>
329 <groupId>org.jacoco</groupId>
330 <artifactId>jacoco-maven-plugin</artifactId>
efiacorf20778f2019-07-23 16:22:03 +0000331 <configuration>
332 <excludes>
333 <exclude>src/main/java/org/onap/dmaap/datarouter/subscriber/**</exclude>
334 </excludes>
335 </configuration>
efiacor1c11ab82019-04-09 13:52:17 +0000336 </plugin>
337 <plugin>
338 <groupId>org.codehaus.mojo</groupId>
339 <artifactId>properties-maven-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100340 </plugin>
341 </plugins>
342 </build>
343</project>