Merge "Pin jnr-unixsocket for Docker plugin to 0.13"
[music.git] / pom.xml
1 <!-- 
2  ============LICENSE_START==========================================
3  org.onap.music
4  ===================================================================
5   Copyright (c) 2017 AT&T Intellectual Property
6  ===================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10  
11      http://www.apache.org/licenses/LICENSE-2.0
12  
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18  
19  ============LICENSE_END=============================================
20  ====================================================================
21 -->  
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25     <groupId>org.onap.music</groupId>
26     <artifactId>MUSIC</artifactId>
27     <packaging>war</packaging>
28     <version>2.5.3</version>
29     <description>
30             This is the MUSIC REST interface, packaged as a war file.
31     </description>
32
33     <parent>
34         <groupId>org.onap.oparent</groupId>
35         <artifactId>oparent</artifactId>
36         <version>0.1.1</version>
37         <relativePath />
38     </parent>
39
40     <properties>
41         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
42         <jersey1.version>1.19</jersey1.version>
43         <jersey2.version>2.25.1</jersey2.version>
44         <jaxrs.version>2.0.1</jaxrs.version>
45         <cassandra.version>3.4.0</cassandra.version>
46         <zookeeper.version>3.4.11</zookeeper.version>
47
48         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
49         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
50         <!--nexus -->
51         <nexusproxy>https://nexus.onap.org</nexusproxy>
52         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
53         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
54         <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
55         <sitePath>/content/sites/site/org/onap/music/${project.version}</sitePath>
56         <!--maven -->
57         <timestamp>${maven.build.timestamp}</timestamp>
58         <maven.build.timestamp.format>yyyy.MM.dd.HH.mm</maven.build.timestamp.format>
59         <!--docker -->
60         <docker.tag>${project.version}-${timestamp}</docker.tag>
61         <docker.latest.tag>${project.version}-latest</docker.latest.tag>
62     </properties>
63
64     <repositories>
65         <repository>
66             <id>ecomp-releases</id>
67             <name>ECOMP Release Repository</name>
68             <url>${onap.nexus.url}/${releaseNexusPath}</url>
69         </repository>
70         <repository>
71             <id>ecomp-snapshots</id>
72             <name>Snapshot Repository</name>
73             <url>${nexusproxy}/${snapshotNexusPath}</url>
74         </repository>
75         <repository>
76             <id>ecomp-staging</id>
77             <name>Staging Repository</name>
78             <url>${nexusproxy}/${stagingNexusPath}</url>
79         </repository>
80     </repositories>
81
82     <build>
83         <finalName>MUSIC</finalName>
84         <sourceDirectory>src/main/java</sourceDirectory>
85         <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
86         <testSourceDirectory>src/test/java</testSourceDirectory>
87         <testOutputDirectory>target/test-classes</testOutputDirectory>
88         <defaultGoal>validate</defaultGoal>
89         <resources>
90             <resource>
91                 <directory>src/main/resources</directory>
92                 <filtering>true</filtering>
93             </resource>
94         </resources>
95         <plugins>
96             <plugin>
97                 <artifactId>maven-eclipse-plugin</artifactId>
98                 <version>2.9</version>
99                 <configuration>
100                     <additionalProjectnatures>
101                         <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
102                     </additionalProjectnatures>
103                     <additionalBuildcommands>
104                         <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
105                     </additionalBuildcommands>
106                     <downloadSources>true</downloadSources>
107                     <downloadJavadocs>true</downloadJavadocs>
108                 </configuration>
109             </plugin>
110             <plugin>
111                 <groupId>org.apache.maven.plugins</groupId>
112                 <artifactId>maven-compiler-plugin</artifactId>
113                 <version>3.5.1</version>
114                 <configuration>
115                     <source>1.7</source>
116                     <target>1.7</target>
117                 </configuration>
118             </plugin>
119             <plugin>
120                 <artifactId>maven-war-plugin</artifactId>
121                 <version>2.4</version>
122                 <configuration>
123                     <warSourceDirectory>WebContent</warSourceDirectory>
124                 </configuration>
125             </plugin>
126             <plugin>
127                 <groupId>org.apache.maven.plugins</groupId>
128                 <artifactId>maven-jar-plugin</artifactId>
129                 <version>2.4</version>
130                 <executions>
131                     <execution>
132                         <id>make-a-jar</id>
133                         <phase>compile</phase>
134                         <goals>
135                             <goal>jar</goal>
136                         </goals>
137                         <configuration>
138                             <excludes>
139                                 <exclude>**/*.xml</exclude>
140                                 <exclude>**/*.properties</exclude>
141                                 <exclude>**/Sample*</exclude>
142                             </excludes>
143                         </configuration>
144                     </execution>
145                 </executions>
146             </plugin>
147             <plugin>
148                 <groupId>org.apache.maven.plugins</groupId>
149                 <artifactId>maven-install-plugin</artifactId>
150                 <version>2.4</version>
151                 <executions>
152                     <execution>
153                         <phase>install</phase>
154                         <goals>
155                             <goal>install-file</goal>
156                         </goals>
157                         <configuration>
158                             <packaging>jar</packaging>
159                             <artifactId>${project.artifactId}</artifactId>
160                             <groupId>${project.groupId}</groupId>
161                             <version>${project.version}</version>
162                             <file>${project.build.directory}/${project.artifactId}.jar</file>
163                         </configuration>
164                     </execution>
165                 </executions>
166             </plugin>
167         </plugins>
168     </build>
169
170     <dependencies>
171         <!-- Development -->
172         <dependency>
173             <groupId>javax.servlet</groupId>
174             <artifactId>servlet-api</artifactId>
175             <version>2.4</version>
176             <scope>provided</scope>
177         </dependency>
178         <dependency>
179             <groupId>javax.servlet</groupId>
180             <artifactId>javax.servlet-api</artifactId>
181             <version>3.0.1</version>
182             <scope>provided</scope>
183         </dependency>
184         <!-- /Development -->
185         
186         <!-- Logging -->
187         <dependency>
188             <groupId>ch.qos.logback</groupId>
189             <artifactId>logback-core</artifactId>
190             <version>1.2.3</version>
191             <exclusions>
192                 <exclusion>
193                     <groupId>org.slf4j</groupId>
194                     <artifactId>slf4j-log4j12</artifactId>
195                 </exclusion>
196             </exclusions>
197         </dependency>
198         <dependency>
199             <groupId>ch.qos.logback</groupId>
200             <artifactId>logback-classic</artifactId>
201             <version>1.2.3</version>
202             <exclusions>
203                 <exclusion>
204                     <groupId>org.slf4j</groupId>
205                     <artifactId>slf4j-log4j12</artifactId>
206                 </exclusion>
207             </exclusions>
208         </dependency>
209         <dependency>
210             <groupId>com.att.eelf</groupId>
211             <artifactId>eelf-core</artifactId>
212             <version>1.0.1-oss</version>
213         </dependency>
214         <!-- End Logging -->
215         
216         <!-- Cassandra -->       
217         <dependency>
218             <groupId>com.datastax.cassandra</groupId>
219             <artifactId>cassandra-driver-core</artifactId>
220             <version>${cassandra.version}</version>
221         </dependency>
222         <!-- /Cassandra -->       
223         
224         <!-- Zookeeper -->
225         <dependency>
226             <groupId>org.apache.zookeeper</groupId>
227             <artifactId>zookeeper</artifactId>
228             <version>${zookeeper.version}</version>
229             <exclusions>
230                 <exclusion>
231                     <groupId>org.slf4j</groupId>
232                     <artifactId>slf4j-log4j12</artifactId>
233                 </exclusion>
234             </exclusions>
235         </dependency>
236         <!-- /Zookeeper -->
237         
238         <!-- Jersey -->
239         <dependency>
240             <groupId>com.sun.jersey</groupId>
241             <artifactId>jersey-client</artifactId>
242             <version>${jersey1.version}</version>
243         </dependency>
244         <dependency>
245             <groupId>com.sun.jersey</groupId>
246             <artifactId>jersey-server</artifactId>
247             <version>${jersey1.version}</version>
248         </dependency>
249         <dependency>
250             <groupId>com.sun.jersey</groupId>
251             <artifactId>jersey-json</artifactId>
252             <version>${jersey1.version}</version>
253         </dependency>
254         <dependency> 
255             <groupId>com.sun.jersey</groupId> 
256             <artifactId>jersey-servlet</artifactId> 
257             <version>${jersey1.version}</version> 
258         </dependency>
259         <!-- /Jersey -->
260
261         <dependency>
262             <groupId>org.apache.commons</groupId>
263             <artifactId>commons-jcs-core</artifactId>
264             <version>2.2</version>
265         </dependency>
266         <dependency>
267             <groupId>commons-codec</groupId>
268             <artifactId>commons-codec</artifactId>
269             <version>1.11</version>
270         </dependency>
271
272         <!-- Testing -->
273         <dependency>
274             <groupId>junit</groupId>
275             <artifactId>junit</artifactId>
276             <version>4.12</version>
277             <scope>test</scope>
278         </dependency>
279         <dependency>
280             <groupId>org.cassandraunit</groupId>
281             <artifactId>cassandra-unit</artifactId>
282             <version>3.3.0.2</version>
283             <scope>test</scope>
284         </dependency>
285         <dependency>
286             <groupId>org.apache.curator</groupId>
287             <artifactId>curator-test</artifactId>
288             <version>2.3.0</version>
289             <exclusions>
290                 <exclusion>
291                     <groupId>org.apache.zookeeper</groupId>
292                     <artifactId>zookeeper</artifactId>
293                 </exclusion>
294                 <exclusion>
295                     <groupId>org.slf4j</groupId>
296                     <artifactId>slf4j-log4j12</artifactId>
297                 </exclusion>
298             </exclusions>
299             <scope>test</scope>
300         </dependency>
301         <dependency>
302             <groupId>org.mockito</groupId>
303             <artifactId>mockito-all</artifactId>
304             <version>1.9.0</version>
305             <scope>test</scope>
306         </dependency>
307         <!--  /Testing -->
308         <dependency>
309             <groupId>io.netty</groupId>
310             <artifactId>netty-handler</artifactId>
311             <version>4.0.56.Final</version>
312         </dependency>
313         <dependency>
314             <groupId>com.fasterxml.jackson.core</groupId>
315             <artifactId>jackson-databind</artifactId>
316             <version>2.9.4</version>
317         </dependency>
318         <dependency>
319             <groupId>org.apache.httpcomponents</groupId>
320             <artifactId>httpclient</artifactId>
321             <version>4.5.3</version>
322         </dependency>
323         <dependency>
324             <groupId>io.swagger</groupId>
325             <artifactId>swagger-jersey-jaxrs</artifactId>
326             <version>1.5.18</version>
327         </dependency>
328         <dependency>
329             <groupId>com.google.guava</groupId>
330             <artifactId>guava</artifactId>
331             <version>19.0</version>
332         </dependency>
333     </dependencies>
334
335     <reporting>
336         <plugins>
337             <plugin>
338                 <groupId>org.apache.maven.plugins</groupId>
339                 <artifactId>maven-javadoc-plugin</artifactId>
340                 <version>2.10.3</version>
341                 <configuration>
342                     <author>true</author>
343                     <breakiterator>true</breakiterator>
344                     <version>true</version>
345                     <links>
346                         <link>https://docs.oracle.com/javase/7/docs/api/</link>
347                         <link>https://tomcat.apache.org/tomcat-7.0-doc/jspapi/</link>
348                         <link>http://docs.oracle.com/javaee/7/api/</link>
349                     </links>
350                 </configuration>
351             </plugin>
352         </plugins>
353     </reporting>
354
355     <profiles>
356         <profile>
357             <id>docker</id>
358             <build>
359                 <plugins>
360                     <plugin>
361                         <groupId>io.fabric8</groupId>
362                         <artifactId>docker-maven-plugin</artifactId>
363                         <version>0.19.1</version>
364                         <dependencies>
365                             <dependency>
366                                 <groupId>com.github.jnr</groupId>
367                                 <artifactId>jnr-unixsocket</artifactId>
368                                 <version>0.13</version>
369                             </dependency>
370                         </dependencies>
371                         <configuration>
372                             <verbose>true</verbose>
373                             <apiVersion>1.23</apiVersion>
374                             <registry>nexus3.onap.org:10003</registry>
375                             <images>
376                                 <!-- MUSIC War -->
377                                 <image>
378                                     <name>onap/music/music</name>
379                                     <alias>docker_music</alias>
380                                     <build>
381                                         <cleanup>true</cleanup>
382                                         <tags>
383                                             <tag>${docker.tag}</tag>
384                                             <tag>${docker.latest.tag}</tag>
385                                         </tags>
386                                         <dockerFileDir>${project.basedir}</dockerFileDir>
387                                         <assembly>
388                                             <descriptorRef>artifact</descriptorRef>
389                                         </assembly>
390                                     </build>
391                                 </image>
392                                 <!-- Cassandra -->
393                                 <image>
394                                     <name>onap/music/cassandra_music</name>
395                                     <alias>docker_cassandra</alias>
396                                     <build>
397                                         <cleanup>true</cleanup>
398                                         <tags>
399                                             <tag>3.0-${timestamp}</tag>
400                                             <tag>3.0-latest</tag>
401                                         </tags>
402                                         <dockerFileDir>${project.basedir}/distribution/cassandra</dockerFileDir>
403                                     </build>
404                                 </image>
405                                 <!-- Zookeeper -->
406                                 <!-- <image> <name>onap/music/zookeeper_music</name> 
407                                     <alias>docker_zookeeper</alias> <build> <cleanup>true</cleanup> <tags> <tag>3.4-${timestamp}</tag> 
408                                     <tag>3.4-latest</tag> </tags> <dockerFileDir>${project.basedir}/distribution/zookeeper</dockerFileDir> 
409                                     </build> </image> -->
410                                 <!-- tomcat 8.5 -->
411                                 <!-- <image> <name>onap/music/tomcat_music</name> 
412                                     <alias>docker_tomcat</alias> <build> <cleanup>true</cleanup> <tags> <tag>8.5-${timestamp}</tag> 
413                                     <tag>8.5-latest</tag> </tags> <dockerFileDir>${project.basedir}/distribution/tomcat</dockerFileDir> 
414                                     </build> </image>\ -->
415                             </images>
416                         </configuration>
417                         <executions>
418                             <execution>
419                                 <id>clean-images</id>
420                                 <phase>pre-clean</phase>
421                                 <goals>
422                                     <goal>remove</goal>
423                                 </goals>
424                                 <configuration>
425                                     <removeAll>true</removeAll>
426                                     <image>music</image>
427                                 </configuration>
428                             </execution>
429                             <execution>
430                                 <id>generate-images</id>
431                                 <phase>package</phase>
432                                 <goals>
433                                     <goal>build</goal>
434                                 </goals>
435                             </execution>
436                             <execution>
437                                 <id>push-images</id>
438                                 <phase>deploy</phase>
439                                 <goals>
440                                     <goal>push</goal>
441                                 </goals>
442                                 <configuration>
443                                     <image>onap/music/music</image>
444                                 </configuration>
445                             </execution>
446                         </executions>
447                     </plugin>
448                 </plugins>
449             </build>
450         </profile>
451     </profiles>
452     <distributionManagement>
453         <repository>
454             <id>ecomp-releases</id>
455             <name>Release Repository</name>
456             <url>${nexusproxy}/${releaseNexusPath}</url>
457         </repository>
458         <snapshotRepository>
459             <id>ecomp-snapshots</id>
460             <name>Snapshot Repository</name>
461             <url>${nexusproxy}/${snapshotNexusPath}</url>
462         </snapshotRepository>
463         <!-- added for javadoc -->
464         <site>
465             <id>ecomp-site</id>
466             <url>dav:${nexusproxy}${sitePath}</url>
467         </site>
468     </distributionManagement>
469 </project>