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