blob: d7294a336a5d5327c7aa8110ecd16f0fbc76d4b3 [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>
48 <groupId>javax.servlet</groupId>
49 <artifactId>javax.servlet-api</artifactId>
edepaul12c71a52018-09-07 16:27:01 +010050 </dependency>
51 <dependency>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010052 <groupId>org.eclipse.jetty</groupId>
53 <artifactId>jetty-server</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010054 </dependency>
55 <dependency>
56 <groupId>org.eclipse.jetty</groupId>
57 <artifactId>jetty-util</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010058 </dependency>
59 <dependency>
60 <groupId>org.eclipse.jetty</groupId>
61 <artifactId>jetty-servlet</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010062 </dependency>
63 <dependency>
64 <groupId>org.eclipse.jetty</groupId>
65 <artifactId>jetty-http</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010066 </dependency>
67 <dependency>
68 <groupId>org.sonatype.http-testing-harness</groupId>
69 <artifactId>junit-runner</artifactId>
efiacor1c11ab82019-04-09 13:52:17 +000070 </dependency>
71 <dependency>
72 <groupId>org.powermock</groupId>
73 <artifactId>powermock-module-junit4</artifactId>
74 </dependency>
75 <dependency>
76 <groupId>org.mockito</groupId>
77 <artifactId>mockito-core</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010078 </dependency>
79 <dependency>
80 <groupId>junit</groupId>
81 <artifactId>junit</artifactId>
efiacor1c11ab82019-04-09 13:52:17 +000082 </dependency>
83 <dependency>
84 <groupId>commons-io</groupId>
85 <artifactId>commons-io</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010086 </dependency>
87 <dependency>
88 <groupId>log4j</groupId>
89 <artifactId>log4j</artifactId>
90 <version>1.2.17</version>
91 <scope>compile</scope>
92 </dependency>
93 </dependencies>
94 <profiles>
95 <profile>
96 <id>docker</id>
97 <properties>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +010098 <skipTests>true</skipTests>
99 </properties>
100 <build>
101 <plugins>
102 <plugin>
efiacor1c11ab82019-04-09 13:52:17 +0000103 <groupId>org.codehaus.gmaven</groupId>
104 <artifactId>gmaven-plugin</artifactId>
sandovalfrefad4612019-03-04 09:31:59 -0500105 </plugin>
106 <plugin>
107 <groupId>io.fabric8</groupId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100108 <artifactId>docker-maven-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100109 <configuration>
sandovalfrefad4612019-03-04 09:31:59 -0500110 <images>
111 <image>
efiacor1c11ab82019-04-09 13:52:17 +0000112 <name>${datarouter.sub.image.name}</name>
sandovalfrefad4612019-03-04 09:31:59 -0500113 <build>
114 <cleanup>try</cleanup>
115 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
116 <dockerFile>Dockerfile</dockerFile>
117 <tags>
118 <tag>${dockertag1}</tag>
119 <tag>${dockertag2}</tag>
120 </tags>
121 </build>
122 </image>
123 </images>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100124 </configuration>
efiacor1c11ab82019-04-09 13:52:17 +0000125 <executions>
126 <execution>
127 <id>generate-images</id>
128 <phase>install</phase>
129 <goals>
130 <goal>build</goal>
131 </goals>
132 </execution>
133 <execution>
134 <id>push-images</id>
135 <phase>deploy</phase>
136 <goals>
137 <goal>push</goal>
138 </goals>
139 </execution>
140 </executions>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100141 </plugin>
142 </plugins>
143 </build>
144 </profile>
145 </profiles>
146 <build>
147 <finalName>datarouter-subscriber</finalName>
148 <resources>
149 <resource>
150 <directory>src/main/resources</directory>
151 <filtering>true</filtering>
152 <includes>
153 <include>**/*.properties</include>
154 </includes>
155 </resource>
156 <resource>
157 <directory>src/main/resources</directory>
158 <filtering>true</filtering>
159 <includes>
160 <include>**/subscriber.properties</include>
161 </includes>
162 </resource>
163 <resource>
164 <directory>src/main/resources</directory>
165 <filtering>true</filtering>
166 <includes>
167 <include>**/log4j.properties</include>
168 </includes>
169 </resource>
170 <resource>
171 <directory>src/test/resources</directory>
172 <filtering>true</filtering>
173 <includes>
174 <include>**/log4j.properties</include>
175 </includes>
176 </resource>
177 </resources>
178 <plugins>
179 <plugin>
180 <artifactId>maven-assembly-plugin</artifactId>
181 <version>2.4</version>
182 <configuration>
183 <descriptorRefs>
184 <descriptorRef>jar-with-dependencies</descriptorRef>
185 </descriptorRefs>
sandovalfrefad4612019-03-04 09:31:59 -0500186 <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/lib</outputDirectory>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100187 <archive>
188 <manifest>
189 <addClasspath>true</addClasspath>
Fiachra Corcoranaa988a22018-08-30 00:43:55 +0100190 <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100191 </manifest>
192 </archive>
193 </configuration>
194 <executions>
195 <execution>
196 <id>make-assembly</id>
197 <!-- this is used for inheritance merges -->
198 <phase>package</phase>
199 <!-- bind to the packaging phase -->
200 <goals>
201 <goal>single</goal>
202 </goals>
203 </execution>
204 </executions>
205 </plugin>
206 <plugin>
207 <groupId>org.apache.maven.plugins</groupId>
208 <artifactId>maven-compiler-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100209 </plugin>
210 <plugin>
211 <artifactId>maven-resources-plugin</artifactId>
212 <version>2.7</version>
213 <executions>
214 <execution>
215 <id>copy-docker-file</id>
sandovalfrefad4612019-03-04 09:31:59 -0500216 <phase>validate</phase>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100217 <goals>
218 <goal>copy-resources</goal>
219 </goals>
220 <configuration>
sandovalfrefad4612019-03-04 09:31:59 -0500221 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100222 <overwrite>true</overwrite>
223 <resources>
224 <resource>
225 <directory>${basedir}/src/main/resources/docker</directory>
226 <filtering>true</filtering>
227 <includes>
228 <include>**/*</include>
229 </includes>
230 </resource>
231 </resources>
232 </configuration>
233 </execution>
234 <execution>
sandovalfrefad4612019-03-04 09:31:59 -0500235 <id>copy-startup-script</id>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100236 <phase>validate</phase>
237 <goals>
238 <goal>copy-resources</goal>
239 </goals>
240 <configuration>
sandovalfrefad4612019-03-04 09:31:59 -0500241 <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
242 <overwrite>true</overwrite>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100243 <resources>
244 <resource>
sandovalfrefad4612019-03-04 09:31:59 -0500245 <directory>${basedir}/src/main/resources/docker</directory>
246 <filtering>true</filtering>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100247 <includes>
sandovalfrefad4612019-03-04 09:31:59 -0500248 <include>startup.sh</include>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100249 </includes>
250 </resource>
251 </resources>
252 </configuration>
253 </execution>
254 <execution>
255 <id>copy-resources-2</id>
256 <phase>validate</phase>
257 <goals>
258 <goal>copy-resources</goal>
259 </goals>
260 <configuration>
sandovalfrefad4612019-03-04 09:31:59 -0500261 <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/etc</outputDirectory>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100262 <resources>
263 <resource>
264 <directory>${basedir}/src/main/resources</directory>
265 <includes>
266 <include>*.properties</include>
267 </includes>
268 </resource>
269 </resources>
270 </configuration>
271 </execution>
272 </executions>
273 </plugin>
274 <plugin>
275 <groupId>org.apache.maven.plugins</groupId>
276 <artifactId>maven-dependency-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100277 <executions>
278 <execution>
279 <id>copy-dependencies</id>
280 <phase>package</phase>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100281 <configuration>
efiacor1c11ab82019-04-09 13:52:17 +0000282 <outputDirectory>${project.build.directory}/docker-stage/opt/app/subscriber/lib</outputDirectory>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100283 </configuration>
284 </execution>
285 </executions>
286 </plugin>
287 <plugin>
288 <groupId>org.apache.maven.plugins</groupId>
289 <artifactId>maven-source-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100290 </plugin>
291 <plugin>
292 <groupId>org.jacoco</groupId>
293 <artifactId>jacoco-maven-plugin</artifactId>
efiacorf20778f2019-07-23 16:22:03 +0000294 <configuration>
295 <excludes>
296 <exclude>src/main/java/org/onap/dmaap/datarouter/subscriber/**</exclude>
297 </excludes>
298 </configuration>
efiacor1c11ab82019-04-09 13:52:17 +0000299 </plugin>
300 <plugin>
301 <groupId>org.codehaus.mojo</groupId>
302 <artifactId>properties-maven-plugin</artifactId>
Fiachra Corcoran19620eb2018-08-27 17:59:42 +0100303 </plugin>
304 </plugins>
305 </build>
306</project>