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