Docker update and POM fix
[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.4.18</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         <jaxrs.version>2.0.1</jaxrs.version>
44         <cassandra.version>3.2.0</cassandra.version>
45         <zookeeper.version>3.4.6</zookeeper.version>
46
47         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
48         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
49         <!--nexus -->
50         <nexusproxy>https://nexus.onap.org</nexusproxy>
51         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
52         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
53         <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
54         <sitePath>/content/sites/site/org/onap/music/${project.version}</sitePath>
55         <!--maven -->
56         <timestamp>${maven.build.timestamp}</timestamp>
57         <maven.build.timestamp.format>yyyy.MM.dd.HH.mm</maven.build.timestamp.format>
58         <!--docker -->
59         <docker.tag>${project.version}-${timestamp}</docker.tag>
60         <docker.latest.tag>${project.version}-latest</docker.latest.tag>
61     </properties>
62
63     <repositories>
64         <repository>
65             <id>ecomp-releases</id>
66             <name>ECOMP Release Repository</name>
67             <url>${onap.nexus.url}/${releaseNexusPath}</url>
68         </repository>
69         <repository>
70             <id>ecomp-snapshots</id>
71             <name>Snapshot Repository</name>
72             <url>${nexusproxy}/${snapshotNexusPath}</url>
73         </repository>
74         <repository>
75             <id>ecomp-staging</id>
76             <name>Staging Repository</name>
77             <url>${nexusproxy}/${stagingNexusPath}</url>
78         </repository>
79     </repositories>
80
81     <build>
82         <finalName>MUSIC</finalName>
83         <sourceDirectory>src/main/java</sourceDirectory>
84         <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
85         <testSourceDirectory>src/test/java</testSourceDirectory>
86         <testOutputDirectory>target/test-classes</testOutputDirectory>
87         <defaultGoal>validate</defaultGoal>
88         <resources>
89             <resource>
90                 <directory>src/main/resources</directory>
91                 <filtering>true</filtering>
92             </resource>
93         </resources>
94         <plugins>
95             <plugin>
96                 <artifactId>maven-eclipse-plugin</artifactId>
97                 <version>2.9</version>
98                 <configuration>
99                     <additionalProjectnatures>
100                         <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
101                     </additionalProjectnatures>
102                     <additionalBuildcommands>
103                         <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
104                     </additionalBuildcommands>
105                     <downloadSources>true</downloadSources>
106                     <downloadJavadocs>true</downloadJavadocs>
107                 </configuration>
108             </plugin>
109             <plugin>
110                 <groupId>org.apache.maven.plugins</groupId>
111                 <artifactId>maven-compiler-plugin</artifactId>
112                 <version>3.5.1</version>
113                 <configuration>
114                     <source>1.7</source>
115                     <target>1.7</target>
116                 </configuration>
117             </plugin>
118             <plugin>
119                 <artifactId>maven-war-plugin</artifactId>
120                 <version>2.4</version>
121                 <configuration>
122                     <warSourceDirectory>WebContent</warSourceDirectory>
123                 </configuration>
124             </plugin>
125             <plugin>
126                 <groupId>org.apache.maven.plugins</groupId>
127                 <artifactId>maven-jar-plugin</artifactId>
128                 <version>2.4</version>
129                 <executions>
130                     <execution>
131                         <id>make-a-jar</id>
132                         <phase>compile</phase>
133                         <goals>
134                             <goal>jar</goal>
135                         </goals>
136                         <configuration>
137                             <excludes>
138                                 <exclude>**/*.xml</exclude>
139                                 <exclude>**/*.properties</exclude>
140                                 <exclude>**/Sample*</exclude>
141                             </excludes>
142                         </configuration>
143                     </execution>
144                 </executions>
145             </plugin>
146             <plugin>
147                 <groupId>org.apache.maven.plugins</groupId>
148                 <artifactId>maven-install-plugin</artifactId>
149                 <version>2.4</version>
150                 <executions>
151                     <execution>
152                         <phase>install</phase>
153                         <goals>
154                             <goal>install-file</goal>
155                         </goals>
156                         <configuration>
157                             <packaging>jar</packaging>
158                             <artifactId>${project.artifactId}</artifactId>
159                             <groupId>${project.groupId}</groupId>
160                             <version>${project.version}</version>
161                             <file>${project.build.directory}/${project.artifactId}.jar</file>
162                         </configuration>
163                     </execution>
164                 </executions>
165             </plugin>
166         </plugins>
167     </build>
168
169     <dependencies>
170         <!-- Development -->
171         <dependency>
172             <groupId>javax.servlet</groupId>
173             <artifactId>servlet-api</artifactId>
174             <version>2.4</version>
175             <scope>provided</scope>
176         </dependency>
177         <dependency>
178             <groupId>javax.servlet</groupId>
179             <artifactId>javax.servlet-api</artifactId>
180             <version>3.0.1</version>
181             <scope>provided</scope>
182         </dependency>
183         <!-- /Development -->
184         
185         <!-- Logging -->
186         <dependency>
187             <groupId>ch.qos.logback</groupId>
188             <artifactId>logback-core</artifactId>
189             <version>1.2.3</version>
190             <exclusions>
191                 <exclusion>
192                     <groupId>org.slf4j</groupId>
193                     <artifactId>slf4j-log4j12</artifactId>
194                 </exclusion>
195             </exclusions>
196         </dependency>
197         <dependency>
198             <groupId>ch.qos.logback</groupId>
199             <artifactId>logback-classic</artifactId>
200             <version>1.2.3</version>
201             <exclusions>
202                 <exclusion>
203                     <groupId>org.slf4j</groupId>
204                     <artifactId>slf4j-log4j12</artifactId>
205                 </exclusion>
206             </exclusions>
207         </dependency>
208         <dependency>
209             <groupId>com.att.eelf</groupId>
210             <artifactId>eelf-core</artifactId>
211             <version>1.0.1-oss</version>
212         </dependency>
213         <!-- End Logging -->
214         
215         <!-- Cassandra -->       
216         <dependency>
217             <groupId>com.datastax.cassandra</groupId>
218             <artifactId>cassandra-driver-core</artifactId>
219             <version>${cassandra.version}</version>
220         </dependency>
221         <!-- /Cassandra -->       
222         
223         <!-- Zookeeper -->
224         <dependency>
225             <groupId>org.apache.zookeeper</groupId>
226             <artifactId>zookeeper</artifactId>
227             <version>${zookeeper.version}</version>
228             <exclusions>
229                 <exclusion>
230                     <groupId>org.slf4j</groupId>
231                     <artifactId>slf4j-log4j12</artifactId>
232                 </exclusion>
233             </exclusions>
234         </dependency>
235         <!-- /Zookeeper -->
236         
237         <!-- Jersey -->
238         <dependency>
239             <groupId>com.sun.jersey</groupId>
240             <artifactId>jersey-client</artifactId>
241             <version>${jersey1.version}</version>
242         </dependency>
243         <dependency>
244             <groupId>com.sun.jersey</groupId>
245             <artifactId>jersey-server</artifactId>
246             <version>${jersey1.version}</version>
247         </dependency>
248         <dependency>
249             <groupId>com.sun.jersey</groupId>
250             <artifactId>jersey-json</artifactId>
251             <version>${jersey1.version}</version>
252         </dependency>
253         <dependency> 
254             <groupId>com.sun.jersey</groupId> 
255             <artifactId>jersey-servlet</artifactId> 
256             <version>${jersey1.version}</version> 
257         </dependency>
258         <!-- /Jersey -->
259
260         <dependency>
261             <groupId>org.apache.commons</groupId>
262             <artifactId>commons-jcs-core</artifactId>
263             <version>2.2</version>
264         </dependency>
265         <dependency>
266             <groupId>commons-codec</groupId>
267             <artifactId>commons-codec</artifactId>
268             <version>1.11</version>
269         </dependency>
270
271         <!-- Testing -->
272         <dependency>
273             <groupId>junit</groupId>
274             <artifactId>junit</artifactId>
275             <version>4.12</version>
276             <scope>test</scope>
277         </dependency>
278         <dependency>
279             <groupId>org.cassandraunit</groupId>
280             <artifactId>cassandra-unit</artifactId>
281             <version>3.3.0.2</version>
282             <scope>test</scope>
283         </dependency>
284         <dependency>
285             <groupId>org.apache.curator</groupId>
286             <artifactId>curator-test</artifactId>
287             <version>2.3.0</version>
288             <exclusions>
289                 <exclusion>
290                     <groupId>org.apache.zookeeper</groupId>
291                     <artifactId>zookeeper</artifactId>
292                 </exclusion>
293                 <exclusion>
294                     <groupId>org.slf4j</groupId>
295                     <artifactId>slf4j-log4j12</artifactId>
296                 </exclusion>
297             </exclusions>
298             <scope>test</scope>
299         </dependency>
300         <dependency>
301             <groupId>org.mockito</groupId>
302             <artifactId>mockito-all</artifactId>
303             <version>1.9.0</version>
304             <scope>test</scope>
305         </dependency>
306         <!--  /Testing -->
307
308         <dependency>
309             <groupId>org.apache.httpcomponents</groupId>
310             <artifactId>httpclient</artifactId>
311             <version>4.5.3</version>
312         </dependency>
313         <dependency>
314             <groupId>io.swagger</groupId>
315             <artifactId>swagger-jersey-jaxrs</artifactId>
316             <version>1.5.8</version>
317         </dependency>
318         <dependency>
319             <groupId>com.google.guava</groupId>
320             <artifactId>guava</artifactId>
321             <version>19.0</version>
322         </dependency>
323     </dependencies>
324
325     <reporting>
326         <plugins>
327             <plugin>
328                 <groupId>org.apache.maven.plugins</groupId>
329                 <artifactId>maven-javadoc-plugin</artifactId>
330                 <version>2.10.3</version>
331                 <configuration>
332                     <author>true</author>
333                     <breakiterator>true</breakiterator>
334                     <version>true</version>
335                     <links>
336                         <link>https://docs.oracle.com/javase/7/docs/api/</link>
337                         <link>https://tomcat.apache.org/tomcat-7.0-doc/jspapi/</link>
338                         <link>http://docs.oracle.com/javaee/7/api/</link>
339                     </links>
340                 </configuration>
341             </plugin>
342         </plugins>
343     </reporting>
344
345     <profiles>
346         <profile>
347             <id>docker</id>
348             <build>
349                 <plugins>
350                     <plugin>
351                         <groupId>io.fabric8</groupId>
352                         <artifactId>docker-maven-plugin</artifactId>
353                         <version>0.19.1</version>
354                         <configuration>
355                             <verbose>true</verbose>
356                             <apiVersion>1.23</apiVersion>
357                             <registry>nexus3.onap.org:10003</registry>
358                             <images>
359                                 <!-- MUSIC War -->
360                                 <image>
361                                     <name>onap/music/music</name>
362                                     <alias>docker_music</alias>
363                                     <build>
364                                         <cleanup>true</cleanup>
365                                         <tags>
366                                             <tag>${docker.tag}</tag>
367                                             <tag>${docker.latest.tag}</tag>
368                                         </tags>
369                                         <dockerFileDir>${project.basedir}</dockerFileDir>
370                                         <assembly>
371                                             <descriptorRef>artifact</descriptorRef>
372                                         </assembly>
373                                     </build>
374                                 </image>
375                                 <!-- Cassandra -->
376                                 <image>
377                                     <name>onap/music/cassandra_music</name>
378                                     <alias>docker_cassandra</alias>
379                                     <build>
380                                         <cleanup>true</cleanup>
381                                         <tags>
382                                             <tag>3.0-${timestamp}</tag>
383                                             <tag>3.0-latest</tag>
384                                         </tags>
385                                         <dockerFileDir>${project.basedir}/distribution/cassandra</dockerFileDir>
386                                     </build>
387                                 </image>
388                                 <!-- Zookeeper -->
389                                 <!-- <image> <name>onap/music/zookeeper_music</name> 
390                                     <alias>docker_zookeeper</alias> <build> <cleanup>true</cleanup> <tags> <tag>3.4-${timestamp}</tag> 
391                                     <tag>3.4-latest</tag> </tags> <dockerFileDir>${project.basedir}/distribution/zookeeper</dockerFileDir> 
392                                     </build> </image> -->
393                                 <!-- tomcat 8.5 -->
394                                 <!-- <image> <name>onap/music/tomcat_music</name> 
395                                     <alias>docker_tomcat</alias> <build> <cleanup>true</cleanup> <tags> <tag>8.5-${timestamp}</tag> 
396                                     <tag>8.5-latest</tag> </tags> <dockerFileDir>${project.basedir}/distribution/tomcat</dockerFileDir> 
397                                     </build> </image>\ -->
398                             </images>
399                         </configuration>
400                         <executions>
401                             <execution>
402                                 <id>clean-images</id>
403                                 <phase>pre-clean</phase>
404                                 <goals>
405                                     <goal>remove</goal>
406                                 </goals>
407                                 <configuration>
408                                     <removeAll>true</removeAll>
409                                     <image>music</image>
410                                 </configuration>
411                             </execution>
412                             <execution>
413                                 <id>generate-images</id>
414                                 <phase>package</phase>
415                                 <goals>
416                                     <goal>build</goal>
417                                 </goals>
418                             </execution>
419                             <execution>
420                                 <id>push-images</id>
421                                 <phase>deploy</phase>
422                                 <goals>
423                                     <goal>push</goal>
424                                 </goals>
425                                 <configuration>
426                                     <image>onap/music/music</image>
427                                 </configuration>
428                             </execution>
429                         </executions>
430                     </plugin>
431                 </plugins>
432             </build>
433         </profile>
434     </profiles>
435     <distributionManagement>
436         <repository>
437             <id>ecomp-releases</id>
438             <name>Release Repository</name>
439             <url>${nexusproxy}/${releaseNexusPath}</url>
440         </repository>
441         <snapshotRepository>
442             <id>ecomp-snapshots</id>
443             <name>Snapshot Repository</name>
444             <url>${nexusproxy}/${snapshotNexusPath}</url>
445         </snapshotRepository>
446         <!-- added for javadoc -->
447         <site>
448             <id>ecomp-site</id>
449             <url>dav:${nexusproxy}${sitePath}</url>
450         </site>
451     </distributionManagement>
452 </project>