pom updates for version settings
[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     </dependencies>
93     <profiles>
94         <profile>
95             <id>docker</id>
96             <properties>
97                 <skipTests>true</skipTests>
98             </properties>
99             <build>
100                 <plugins>
101                     <plugin>
102                         <groupId>org.codehaus.gmaven</groupId>
103                         <artifactId>gmaven-plugin</artifactId>
104                     </plugin>
105                     <plugin>
106                         <groupId>io.fabric8</groupId>
107                         <artifactId>docker-maven-plugin</artifactId>
108                         <configuration>
109                             <images>
110                                 <image>
111                                     <name>${datarouter.sub.image.name}</name>
112                                     <build>
113                                         <cleanup>try</cleanup>
114                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
115                                         <dockerFile>Dockerfile</dockerFile>
116                                         <tags>
117                                             <tag>${dockertag1}</tag>
118                                             <tag>${dockertag2}</tag>
119                                         </tags>
120                                     </build>
121                                 </image>
122                             </images>
123                         </configuration>
124                         <executions>
125                             <execution>
126                                 <id>generate-images</id>
127                                 <phase>install</phase>
128                                 <goals>
129                                     <goal>build</goal>
130                                 </goals>
131                             </execution>
132                             <execution>
133                                 <id>push-images</id>
134                                 <phase>deploy</phase>
135                                 <goals>
136                                     <goal>push</goal>
137                                 </goals>
138                             </execution>
139                         </executions>
140                     </plugin>
141                 </plugins>
142             </build>
143         </profile>
144     </profiles>
145     <build>
146         <finalName>datarouter-subscriber</finalName>
147         <resources>
148             <resource>
149                 <directory>src/main/resources</directory>
150                 <filtering>true</filtering>
151                 <includes>
152                     <include>**/*.properties</include>
153                 </includes>
154             </resource>
155             <resource>
156                 <directory>src/main/resources</directory>
157                 <filtering>true</filtering>
158                 <includes>
159                     <include>**/subscriber.properties</include>
160                 </includes>
161             </resource>
162             <resource>
163                 <directory>src/main/resources</directory>
164                 <filtering>true</filtering>
165                 <includes>
166                     <include>**/log4j.properties</include>
167                 </includes>
168             </resource>
169             <resource>
170                 <directory>src/test/resources</directory>
171                 <filtering>true</filtering>
172                 <includes>
173                     <include>**/log4j.properties</include>
174                 </includes>
175             </resource>
176         </resources>
177         <plugins>
178             <plugin>
179                 <artifactId>maven-assembly-plugin</artifactId>
180                 <version>2.4</version>
181                 <configuration>
182                     <descriptorRefs>
183                         <descriptorRef>jar-with-dependencies</descriptorRef>
184                     </descriptorRefs>
185                     <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/lib</outputDirectory>
186                     <archive>
187                         <manifest>
188                             <addClasspath>true</addClasspath>
189                             <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
190                         </manifest>
191                     </archive>
192                 </configuration>
193                 <executions>
194                     <execution>
195                         <id>make-assembly</id>
196                         <!-- this is used for inheritance merges -->
197                         <phase>package</phase>
198                         <!-- bind to the packaging phase -->
199                         <goals>
200                             <goal>single</goal>
201                         </goals>
202                     </execution>
203                 </executions>
204             </plugin>
205             <plugin>
206                 <groupId>org.apache.maven.plugins</groupId>
207                 <artifactId>maven-compiler-plugin</artifactId>
208             </plugin>
209             <plugin>
210                 <artifactId>maven-resources-plugin</artifactId>
211                 <version>2.7</version>
212                 <executions>
213                     <execution>
214                         <id>copy-docker-file</id>
215                         <phase>validate</phase>
216                         <goals>
217                             <goal>copy-resources</goal>
218                         </goals>
219                         <configuration>
220                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
221                             <overwrite>true</overwrite>
222                             <resources>
223                                 <resource>
224                                     <directory>${basedir}/src/main/resources/docker</directory>
225                                     <filtering>true</filtering>
226                                     <includes>
227                                         <include>**/*</include>
228                                     </includes>
229                                 </resource>
230                             </resources>
231                         </configuration>
232                     </execution>
233                     <execution>
234                         <id>copy-startup-script</id>
235                         <phase>validate</phase>
236                         <goals>
237                             <goal>copy-resources</goal>
238                         </goals>
239                         <configuration>
240                             <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
241                             <overwrite>true</overwrite>
242                             <resources>
243                                 <resource>
244                                     <directory>${basedir}/src/main/resources/docker</directory>
245                                     <filtering>true</filtering>
246                                     <includes>
247                                         <include>startup.sh</include>
248                                     </includes>
249                                 </resource>
250                             </resources>
251                         </configuration>
252                     </execution>
253                     <execution>
254                         <id>copy-resources-2</id>
255                         <phase>validate</phase>
256                         <goals>
257                             <goal>copy-resources</goal>
258                         </goals>
259                         <configuration>
260                             <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/etc</outputDirectory>
261                             <resources>
262                                 <resource>
263                                     <directory>${basedir}/src/main/resources</directory>
264                                     <includes>
265                                         <include>*.properties</include>
266                                     </includes>
267                                 </resource>
268                             </resources>
269                         </configuration>
270                     </execution>
271                 </executions>
272             </plugin>
273             <plugin>
274                 <groupId>org.apache.maven.plugins</groupId>
275                 <artifactId>maven-dependency-plugin</artifactId>
276                 <executions>
277                     <execution>
278                         <id>copy-dependencies</id>
279                         <phase>package</phase>
280                         <configuration>
281                             <outputDirectory>${project.build.directory}/docker-stage/opt/app/subscriber/lib</outputDirectory>
282                         </configuration>
283                     </execution>
284                 </executions>
285             </plugin>
286             <plugin>
287                 <groupId>org.apache.maven.plugins</groupId>
288                 <artifactId>maven-source-plugin</artifactId>
289             </plugin>
290             <plugin>
291                 <groupId>org.jacoco</groupId>
292                 <artifactId>jacoco-maven-plugin</artifactId>
293             </plugin>
294             <plugin>
295                 <groupId>org.codehaus.mojo</groupId>
296                 <artifactId>properties-maven-plugin</artifactId>
297             </plugin>
298         </plugins>
299     </build>
300 </project>