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