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