Implementing CSI Docker Benchmark v.1.2.0
[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                                         <noCache>true</noCache>
116                                         <optimise>true</optimise>
117                                         <contextDir>${basedir}/target/docker-stage</contextDir>
118                                         <dockerFile>Dockerfile</dockerFile>
119                                         <tags>
120                                             <tag>${dockertag1}</tag>
121                                             <tag>${dockertag2}</tag>
122                                         </tags>
123                                     </build>
124                                 </image>
125                             </images>
126                         </configuration>
127                         <executions>
128                             <execution>
129                                 <id>generate-images</id>
130                                 <phase>install</phase>
131                                 <goals>
132                                     <goal>build</goal>
133                                 </goals>
134                             </execution>
135                             <execution>
136                                 <id>push-images</id>
137                                 <phase>deploy</phase>
138                                 <goals>
139                                     <goal>push</goal>
140                                 </goals>
141                             </execution>
142                         </executions>
143                     </plugin>
144                 </plugins>
145             </build>
146         </profile>
147     </profiles>
148     <build>
149         <finalName>datarouter-subscriber</finalName>
150         <resources>
151             <resource>
152                 <directory>src/main/resources</directory>
153                 <filtering>true</filtering>
154                 <includes>
155                     <include>**/*.properties</include>
156                 </includes>
157             </resource>
158         </resources>
159         <plugins>
160             <plugin>
161                 <artifactId>maven-assembly-plugin</artifactId>
162                 <version>2.4</version>
163                 <configuration>
164                     <descriptorRefs>
165                         <descriptorRef>jar-with-dependencies</descriptorRef>
166                     </descriptorRefs>
167                     <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/lib</outputDirectory>
168                     <archive>
169                         <manifest>
170                             <addClasspath>true</addClasspath>
171                             <mainClass>org.onap.dmaap.datarouter.subscriber.SubscriberMain</mainClass>
172                         </manifest>
173                     </archive>
174                 </configuration>
175                 <executions>
176                     <execution>
177                         <id>make-assembly</id>
178                         <!-- this is used for inheritance merges -->
179                         <phase>package</phase>
180                         <!-- bind to the packaging phase -->
181                         <goals>
182                             <goal>single</goal>
183                         </goals>
184                     </execution>
185                 </executions>
186             </plugin>
187             <plugin>
188                 <groupId>org.apache.maven.plugins</groupId>
189                 <artifactId>maven-compiler-plugin</artifactId>
190             </plugin>
191             <plugin>
192                 <artifactId>maven-resources-plugin</artifactId>
193                 <version>2.7</version>
194                 <executions>
195                     <execution>
196                         <id>copy-docker-file</id>
197                         <phase>validate</phase>
198                         <goals>
199                             <goal>copy-resources</goal>
200                         </goals>
201                         <configuration>
202                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
203                             <overwrite>true</overwrite>
204                             <resources>
205                                 <resource>
206                                     <directory>${basedir}/src/main/resources/docker</directory>
207                                     <filtering>true</filtering>
208                                     <includes>
209                                         <include>Dockerfile</include>
210                                     </includes>
211                                 </resource>
212                             </resources>
213                         </configuration>
214                     </execution>
215                     <execution>
216                         <id>copy-startup-script</id>
217                         <phase>validate</phase>
218                         <goals>
219                             <goal>copy-resources</goal>
220                         </goals>
221                         <configuration>
222                             <outputDirectory>${basedir}/target/docker-stage/opt</outputDirectory>
223                             <overwrite>true</overwrite>
224                             <resources>
225                                 <resource>
226                                     <directory>${basedir}/src/main/resources/docker</directory>
227                                     <filtering>true</filtering>
228                                     <includes>
229                                         <include>startup.sh</include>
230                                     </includes>
231                                 </resource>
232                             </resources>
233                         </configuration>
234                     </execution>
235                     <execution>
236                         <id>copy-resources-2</id>
237                         <phase>validate</phase>
238                         <goals>
239                             <goal>copy-resources</goal>
240                         </goals>
241                         <configuration>
242                             <outputDirectory>${basedir}/target/docker-stage/opt/app/subscriber/etc</outputDirectory>
243                             <resources>
244                                 <resource>
245                                     <directory>${basedir}/src/main/resources</directory>
246                                     <includes>
247                                         <include>*.properties</include>
248                                     </includes>
249                                 </resource>
250                             </resources>
251                         </configuration>
252                     </execution>
253                 </executions>
254             </plugin>
255             <plugin>
256                 <groupId>org.apache.maven.plugins</groupId>
257                 <artifactId>maven-source-plugin</artifactId>
258             </plugin>
259             <plugin>
260                 <groupId>org.jacoco</groupId>
261                 <artifactId>jacoco-maven-plugin</artifactId>
262                   <configuration>
263                     <excludes>
264                       <exclude>src/main/java/org/onap/dmaap/datarouter/subscriber/**</exclude>
265                     </excludes>
266                   </configuration>
267             </plugin>
268             <plugin>
269                 <groupId>org.codehaus.mojo</groupId>
270                 <artifactId>properties-maven-plugin</artifactId>
271             </plugin>
272         </plugins>
273     </build>
274 </project>