Merge "More bug fix and refactoring"
[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>javax.servlet</groupId>
49             <artifactId>javax.servlet-api</artifactId>
50         </dependency>
51         <dependency>
52             <groupId>org.eclipse.jetty</groupId>
53             <artifactId>jetty-server</artifactId>
54         </dependency>
55         <dependency>
56             <groupId>org.eclipse.jetty</groupId>
57             <artifactId>jetty-util</artifactId>
58         </dependency>
59         <dependency>
60             <groupId>org.eclipse.jetty</groupId>
61             <artifactId>jetty-servlet</artifactId>
62         </dependency>
63         <dependency>
64             <groupId>org.eclipse.jetty</groupId>
65             <artifactId>jetty-http</artifactId>
66         </dependency>
67         <dependency>
68             <groupId>org.sonatype.http-testing-harness</groupId>
69             <artifactId>junit-runner</artifactId>
70         </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>
78         </dependency>
79         <dependency>
80             <groupId>junit</groupId>
81             <artifactId>junit</artifactId>
82         </dependency>
83         <dependency>
84             <groupId>commons-io</groupId>
85             <artifactId>commons-io</artifactId>
86         </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>
98                 <skipTests>true</skipTests>
99             </properties>
100             <build>
101                 <plugins>
102                     <plugin>
103                         <groupId>org.codehaus.gmaven</groupId>
104                         <artifactId>gmaven-plugin</artifactId>
105                     </plugin>
106                     <plugin>
107                         <groupId>io.fabric8</groupId>
108                         <artifactId>docker-maven-plugin</artifactId>
109                         <configuration>
110                             <images>
111                                 <image>
112                                     <name>${datarouter.sub.image.name}</name>
113                                     <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>
124                         </configuration>
125                         <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>
141                     </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         </resources>
157         <plugins>
158             <plugin>
159                 <artifactId>maven-assembly-plugin</artifactId>
160                 <version>2.4</version>
161                 <configuration>
162                     <descriptorRefs>
163                         <descriptorRef>jar-with-dependencies</descriptorRef>
164                     </descriptorRefs>
165                     <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/lib</outputDirectory>
166                     <archive>
167                         <manifest>
168                             <addClasspath>true</addClasspath>
169                             <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
170                         </manifest>
171                     </archive>
172                 </configuration>
173                 <executions>
174                     <execution>
175                         <id>make-assembly</id>
176                         <!-- this is used for inheritance merges -->
177                         <phase>package</phase>
178                         <!-- bind to the packaging phase -->
179                         <goals>
180                             <goal>single</goal>
181                         </goals>
182                     </execution>
183                 </executions>
184             </plugin>
185             <plugin>
186                 <groupId>org.apache.maven.plugins</groupId>
187                 <artifactId>maven-compiler-plugin</artifactId>
188             </plugin>
189             <plugin>
190                 <artifactId>maven-resources-plugin</artifactId>
191                 <version>2.7</version>
192                 <executions>
193                     <execution>
194                         <id>copy-docker-file</id>
195                         <phase>validate</phase>
196                         <goals>
197                             <goal>copy-resources</goal>
198                         </goals>
199                         <configuration>
200                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
201                             <overwrite>true</overwrite>
202                             <resources>
203                                 <resource>
204                                     <directory>${basedir}/src/main/resources/docker</directory>
205                                     <filtering>true</filtering>
206                                     <includes>
207                                         <include>Dockerfile</include>
208                                     </includes>
209                                 </resource>
210                             </resources>
211                         </configuration>
212                     </execution>
213                     <execution>
214                         <id>copy-startup-script</id>
215                         <phase>validate</phase>
216                         <goals>
217                             <goal>copy-resources</goal>
218                         </goals>
219                         <configuration>
220                             <outputDirectory>${basedir}/target/docker-stage/opt</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>startup.sh</include>
228                                     </includes>
229                                 </resource>
230                             </resources>
231                         </configuration>
232                     </execution>
233                     <execution>
234                         <id>copy-resources-2</id>
235                         <phase>validate</phase>
236                         <goals>
237                             <goal>copy-resources</goal>
238                         </goals>
239                         <configuration>
240                             <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/etc</outputDirectory>
241                             <resources>
242                                 <resource>
243                                     <directory>${basedir}/src/main/resources</directory>
244                                     <includes>
245                                         <include>*.properties</include>
246                                     </includes>
247                                 </resource>
248                             </resources>
249                         </configuration>
250                     </execution>
251                 </executions>
252             </plugin>
253             <plugin>
254                 <groupId>org.apache.maven.plugins</groupId>
255                 <artifactId>maven-source-plugin</artifactId>
256             </plugin>
257             <plugin>
258                 <groupId>org.jacoco</groupId>
259                 <artifactId>jacoco-maven-plugin</artifactId>
260                   <configuration>
261                     <excludes>
262                       <exclude>src/main/java/org/onap/dmaap/datarouter/subscriber/**</exclude>
263                     </excludes>
264                   </configuration>
265             </plugin>
266             <plugin>
267                 <groupId>org.codehaus.mojo</groupId>
268                 <artifactId>properties-maven-plugin</artifactId>
269             </plugin>
270         </plugins>
271     </build>
272 </project>