Sonar and CLM fixes and Unit test
[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.12</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.17</jersey1.version>
43         <jersey2.version>2.26</jersey2.version>
44         <jaxrs.version>2.0.1</jaxrs.version>
45         <cassandra.version>3.0.0</cassandra.version>
46         <zookeeper.version>3.4.6</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
172         <dependency>
173             <groupId>ch.qos.logback</groupId>
174             <artifactId>logback-core</artifactId>
175             <version>1.2.3</version>
176
177             <exclusions>
178                 <exclusion>
179                     <groupId>org.slf4j</groupId>
180                     <artifactId>slf4j-log4j12</artifactId>
181                 </exclusion>
182             </exclusions>
183         </dependency>
184
185         <dependency>
186             <groupId>ch.qos.logback</groupId>
187             <artifactId>logback-classic</artifactId>
188             <version>1.2.3</version>
189             <exclusions>
190                 <exclusion>
191                     <groupId>org.slf4j</groupId>
192                     <artifactId>slf4j-log4j12</artifactId>
193                 </exclusion>
194             </exclusions>
195         </dependency>
196
197         <dependency>
198             <groupId>com.datastax.cassandra</groupId>
199             <artifactId>cassandra-driver-core</artifactId>
200             <version>${cassandra.version}</version>
201         </dependency>
202
203         <dependency>
204             <groupId>org.cassandraunit</groupId>
205             <artifactId>cassandra-unit</artifactId>
206             <version>3.3.0.2</version>
207         </dependency>
208         <dependency>
209             <groupId>org.apache.curator</groupId>
210             <artifactId>curator-test</artifactId>
211             <version>2.3.0</version>
212             <exclusions>
213                 <exclusion>
214                     <groupId>org.apache.zookeeper</groupId>
215                     <artifactId>zookeeper</artifactId>
216                 </exclusion>
217                 <exclusion>
218                     <groupId>org.slf4j</groupId>
219                     <artifactId>slf4j-log4j12</artifactId>
220                 </exclusion>
221             </exclusions>
222             <scope>test</scope>
223         </dependency>
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         <dependency>
236             <groupId>com.sun.jersey</groupId>
237             <artifactId>jersey-client</artifactId>
238             <version>${jersey1.version}</version>
239         </dependency>
240         <dependency>
241             <groupId>com.sun.jersey</groupId>
242             <artifactId>jersey-server</artifactId>
243             <version>${jersey1.version}</version>
244         </dependency>
245         <dependency>
246             <groupId>com.sun.jersey</groupId>
247             <artifactId>jersey-json</artifactId>
248             <version>${jersey1.version}</version>
249         </dependency>
250         <dependency>
251             <groupId>javax.servlet</groupId>
252             <artifactId>servlet-api</artifactId>
253             <version>2.4</version>
254             <scope>provided</scope>
255         </dependency>
256         <dependency>
257             <groupId>org.apache.maven</groupId>
258             <artifactId>maven-model</artifactId>
259             <version>3.3.9</version>
260         </dependency>
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>javax.servlet</groupId>
268             <artifactId>javax.servlet-api</artifactId>
269             <version>3.0.1</version>
270             <scope>provided</scope>
271         </dependency>
272         <dependency>
273             <groupId>commons-codec</groupId>
274             <artifactId>commons-codec</artifactId>
275             <version>1.11</version>
276         </dependency>
277         <dependency>
278             <groupId>junit</groupId>
279             <artifactId>junit</artifactId>
280             <version>4.12</version>
281             <scope>test</scope>
282         </dependency>
283
284         <dependency>
285             <groupId>org.mockito</groupId>
286             <artifactId>mockito-all</artifactId>
287             <version>1.9.0</version>
288         </dependency>
289         <dependency>
290             <groupId>io.swagger</groupId>
291             <artifactId>swagger-jersey-jaxrs</artifactId>
292             <version>1.5.8</version>
293         </dependency>
294
295         <dependency>
296             <groupId>com.google.guava</groupId>
297             <artifactId>guava</artifactId>
298             <version>19.0</version>
299         </dependency>
300
301         <dependency>
302             <groupId>com.att.eelf</groupId>
303             <artifactId>eelf-core</artifactId>
304             <version>1.0.1-oss</version>
305         </dependency>
306     </dependencies>
307
308     <reporting>
309         <plugins>
310             <plugin>
311                 <groupId>org.apache.maven.plugins</groupId>
312                 <artifactId>maven-javadoc-plugin</artifactId>
313                 <version>2.10.3</version>
314                 <configuration>
315                     <author>true</author>
316                     <breakiterator>true</breakiterator>
317                     <version>true</version>
318                     <links>
319                         <link>https://docs.oracle.com/javase/7/docs/api/</link>
320                         <link>https://tomcat.apache.org/tomcat-7.0-doc/jspapi/</link>
321                         <link>http://docs.oracle.com/javaee/7/api/</link>
322                     </links>
323                 </configuration>
324             </plugin>
325         </plugins>
326     </reporting>
327
328     <profiles>
329         <profile>
330             <id>docker</id>
331             <build>
332                 <plugins>
333                     <plugin>
334                         <groupId>io.fabric8</groupId>
335                         <artifactId>docker-maven-plugin</artifactId>
336                         <version>0.19.1</version>
337                         <configuration>
338                             <verbose>true</verbose>
339                             <apiVersion>1.23</apiVersion>
340                             <registry>nexus3.onap.org:10003</registry>
341                             <images>
342                                 <!-- MUSIC War -->
343                                 <image>
344                                     <name>music</name>
345                                     <alias>docker_music</alias>
346                                     <build>
347                                         <cleanup>true</cleanup>
348                                         <tags>
349                                             <tag>${docker.tag}</tag>
350                                             <tag>${docker.latest.tag}</tag>
351                                         </tags>
352                                         <dockerFileDir>${project.basedir}</dockerFileDir>
353                                         <assembly>
354                                             <descriptorRef>artifact</descriptorRef>
355                                         </assembly>
356                                     </build>
357                                 </image>
358                             </images>
359                         </configuration>
360                         <executions>
361                             <execution>
362                                 <id>clean-images</id>
363                                 <phase>pre-clean</phase>
364                                 <goals>
365                                     <goal>remove</goal>
366                                 </goals>
367                                 <configuration>
368                                     <removeAll>true</removeAll>
369                                     <image>music</image>
370                                 </configuration>
371                             </execution>
372                             <execution>
373                                 <id>generate-images</id>
374                                 <phase>package</phase>
375                                 <goals>
376                                     <goal>build</goal>
377                                 </goals>
378                             </execution>
379                             <execution>
380                                 <id>push-images</id>
381                                 <phase>deploy</phase>
382                                 <goals>
383                                     <goal>push</goal>
384                                 </goals>
385                                 <configuration>
386                                     <image>music</image>
387                                 </configuration>
388                             </execution>
389                         </executions>
390                     </plugin>
391                 </plugins>    
392             </build>
393         </profile>
394     </profiles>
395     <distributionManagement>
396         <repository>
397             <id>ecomp-releases</id>
398             <name>Release Repository</name>
399             <url>${nexusproxy}/${releaseNexusPath}</url>
400         </repository>
401         <snapshotRepository>
402             <id>ecomp-snapshots</id>
403             <name>Snapshot Repository</name>
404             <url>${nexusproxy}/${snapshotNexusPath}</url>
405         </snapshotRepository>
406         <!-- added for javadoc -->
407         <site>
408             <id>ecomp-site</id>
409             <url>dav:${nexusproxy}${sitePath}</url>
410         </site>
411     </distributionManagement>
412 </project>