Merge "RestMusicQAPI.java - Sonar Fixes"
[music.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  ============LICENSE_START==========================================
4  org.onap.music
5  ===================================================================
6   Copyright (c) 2017 AT&T Intellectual Property
7  ===================================================================
8   Modifications Copyright (c) 2019 IBM.
9  ===================================================================
10   Licensed under the Apache License, Version 2.0 (the "License");
11   you may not use this file except in compliance with the License.
12   You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16   Unless required by applicable law or agreed to in writing, software
17   distributed under the License is distributed on an "AS IS" BASIS,
18   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   See the License for the specific language governing permissions and
20   limitations under the License.
21
22  ============LICENSE_END=============================================
23  ====================================================================
24 -->
25 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26     <modelVersion>4.0.0</modelVersion>
27     <groupId>org.onap.music</groupId>
28     <artifactId>MUSIC</artifactId>
29     <packaging>jar</packaging>
30     <version>3.2.18-SNAPSHOT</version>
31     <description>
32             This is the MUSIC REST interface, packaged as a Springboot jar file.
33     </description>
34
35       <parent>
36         <groupId>org.onap.oparent</groupId>
37         <artifactId>oparent</artifactId>
38         <version>1.2.0</version>
39         <relativePath/>
40     </parent> 
41
42     <dependencyManagement>
43         <dependencies>
44             <!-- <dependency>
45                 <groupId>org.springframework.boot</groupId>
46                 <artifactId>spring-boot-starter-data-jpa</artifactId>
47                 <version>2.0.3.RELEASE</version>
48                </dependency> -->
49             <dependency>
50                 <groupId>org.springframework.boot</groupId>
51                 <artifactId>spring-boot-dependencies</artifactId>
52                 <version>2.1.1.RELEASE</version>
53                 <type>pom</type>
54                 <scope>import</scope>
55             </dependency>
56         </dependencies>
57     </dependencyManagement>
58     <properties>
59         <start-class>org.onap.music.MusicApplication</start-class>
60         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
61         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
62         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
63         <java.version>1.8</java.version>
64         <jersey1.version>1.19</jersey1.version>
65         <jersey2.version>2.25.1</jersey2.version>
66         <jaxrs.version>2.0.1</jaxrs.version>
67         <cassandra.version>3.6.0</cassandra.version>
68
69         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
70         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
71         <!--nexus -->
72         <nexusproxy>https://nexus.onap.org</nexusproxy>
73         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
74         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
75         <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
76         <sitePath>/content/sites/site/org/onap/music/${project.version}</sitePath>
77         <!--maven -->
78         <timestamp>${maven.build.timestamp}</timestamp>
79         <maven.build.timestamp.format>yyyy.MM.dd.HH.mm</maven.build.timestamp.format>
80         <!--docker -->
81         <docker.tag>${project.version}-${timestamp}</docker.tag>
82         <docker.latest.tag>${project.version}-latest</docker.latest.tag>
83         <maven.compiler.source>1.8</maven.compiler.source>
84         <maven.compiler.target>1.8</maven.compiler.target>
85     </properties>
86
87     <repositories>
88         <repository>
89             <id>onap-releases</id>
90             <name>ONAP - Release Repository</name>
91             <url>${nexusproxy}/${releaseNexusPath}</url>
92         </repository>
93         <repository>
94             <id>onap-staging</id>
95             <name>ONAP - Staging Repository</name>
96             <url>${nexusproxy}/${stagingNexusPath}</url>
97         </repository>
98         <repository>
99             <id>onap-snapshots</id>
100             <name>ONAP - Snapshot Repository</name>
101             <url>${nexusproxy}/${snapshotNexusPath}</url>
102         </repository>
103         <repository>
104             <id>onap-public</id>
105             <name>ONAP public Repository</name>
106             <url>${nexusproxy}/content/groups/public</url>
107         </repository>
108         <repository>
109             <!-- SWM repository has EELF jars -->
110             <id>att-cadi-repo</id>
111             <name>ATT CADI Repository</name>
112             <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/attarch-releases/</url>
113         </repository>
114         
115     </repositories>
116
117     <build>
118         <!-- <finalName>${project.artifactId}-${project.version}-${timestamp}</finalName>-->
119         <finalName>${project.artifactId}</finalName>
120         <sourceDirectory>src/main/java</sourceDirectory>
121         <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
122         <testSourceDirectory>src/test/java</testSourceDirectory>
123         <testOutputDirectory>target/test-classes</testOutputDirectory>
124         <defaultGoal>validate</defaultGoal>
125         <resources>
126             <resource>
127                 <directory>src/main/resources</directory>
128                 <filtering>true</filtering>
129                 <includes>
130                 <include>**/*.properties</include>
131                 <include>**/*.xml</include>
132                 <include>**/*.ccf</include>
133                 </includes>
134             </resource>
135         </resources>
136         <plugins>
137             <plugin>
138                 <groupId>org.springframework.boot</groupId>
139                 <artifactId>spring-boot-maven-plugin</artifactId>
140                 <configuration>
141                     <mainClass>org.onap.music.MusicApplication</mainClass>
142                     <outputDirectory>./distribution/music/</outputDirectory>
143                     <addResources>true</addResources>
144                  </configuration>
145                 <executions>
146                     <execution>
147                         <goals>
148                             <goal>repackage</goal>
149                         </goals>
150                     </execution>
151                 </executions>
152             </plugin>
153 <!--
154             <plugin>
155                 <artifactId>maven-war-plugin</artifactId>
156                 <version>2.4</version>
157                 <configuration>
158                     <warSourceDirectory>WebContent</warSourceDirectory>
159                     <failOnMissingWebXml>false</failOnMissingWebXml>
160                 </configuration>
161             </plugin>
162 -->
163             <plugin>
164                 <groupId>org.apache.maven.plugins</groupId>
165                 <artifactId>maven-jar-plugin</artifactId>
166                 <version>2.4</version>
167                 <executions>
168                     <execution>
169                         <id>make-a-jar</id>
170                         <phase>compile</phase>
171                         <goals>
172                             <goal>jar</goal>
173                         </goals>
174                         <configuration>
175                             <excludes>
176                                 <!--<exclude>**/*.xml</exclude>
177                                 <exclude>**/*.properties</exclude>-->
178                                 <exclude>**/Sample*</exclude>
179                             </excludes>
180                         </configuration>
181                     </execution>
182                 </executions>
183             </plugin>
184             <plugin>
185                 <groupId>org.apache.maven.plugins</groupId>
186                 <artifactId>maven-install-plugin</artifactId>
187                 <version>2.4</version>
188                 <executions>
189                     <execution>
190                         <phase>install</phase>
191                         <goals>
192                             <goal>install-file</goal>
193                         </goals>
194                         <configuration>
195                             <packaging>jar</packaging>
196                             <artifactId>${project.artifactId}</artifactId>
197                             <groupId>${project.groupId}</groupId>
198                             <version>${project.version}</version>
199                             <file>${project.build.directory}/${project.artifactId}.jar</file>
200                         </configuration>
201                     </execution>
202                 </executions>
203             </plugin>
204         </plugins>
205     </build>
206
207     <dependencies>
208         <!-- Springboot -->
209          <dependency>
210             <groupId>org.springframework.boot</groupId>
211             <artifactId>spring-boot-starter</artifactId>
212         </dependency>
213         <dependency>
214             <groupId>org.springframework.data</groupId>
215             <artifactId>spring-data-cassandra</artifactId>
216         </dependency>
217         <dependency>
218             <groupId>org.springframework.boot</groupId>
219             <artifactId>spring-boot-starter-jersey</artifactId>
220         </dependency>
221         <dependency>
222             <groupId>org.springframework.boot</groupId>
223             <artifactId>spring-boot-starter-tomcat</artifactId>
224         </dependency>
225         <dependency>
226             <groupId>org.springframework.boot</groupId>
227             <artifactId>spring-boot-starter-test</artifactId>
228             <scope>test</scope>
229         </dependency>
230         <dependency>
231           <groupId>org.springframework.boot</groupId>
232           <artifactId>spring-boot-starter-actuator</artifactId>
233         </dependency>
234         <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
235          <dependency>
236             <groupId>org.springframework</groupId>
237             <artifactId>spring-aop</artifactId>
238             <scope>compile</scope>
239         </dependency>
240         <!--  Swagger 2 -->
241 <!--         <dependency>
242             <groupId>io.springfox</groupId>
243             <artifactId>springfox-swagger2</artifactId>
244             <version>2.8.0</version>
245             <scope>compile</scope>
246         </dependency>
247  -->
248 <!--         <dependency>
249             <groupId>io.springfox</groupId>
250             <artifactId>springfox-swagger-ui</artifactId>
251             <version>2.8.0</version>
252             <scope>compile</scope>
253         </dependency>
254   -->
255         <!-- End Swagger -->
256         <dependency>
257             <groupId>org.aspectj</groupId>
258             <artifactId>aspectjweaver</artifactId>
259             <scope>compile</scope>
260         </dependency>
261         
262         <!-- Springboot -->
263         <!-- Development -->
264         <dependency>
265             <groupId>javax.servlet</groupId>
266             <artifactId>servlet-api</artifactId>
267             <version>2.4</version>
268             <scope>provided</scope>
269         </dependency>
270         <dependency>
271             <groupId>org.springframework.boot</groupId>
272             <artifactId>spring-boot-autoconfigure</artifactId>
273         </dependency>
274         <dependency>
275             <groupId>javax.servlet</groupId>
276             <artifactId>javax.servlet-api</artifactId>
277             <version>3.0.1</version>
278             <scope>provided</scope>
279         </dependency>
280         <!-- /Development -->
281         <!-- Logging -->
282         <dependency>
283             <groupId>ch.qos.logback</groupId>
284             <artifactId>logback-core</artifactId>
285             <version>1.2.3</version>
286             <exclusions>
287                 <exclusion>
288                     <groupId>org.slf4j</groupId>
289                     <artifactId>slf4j-log4j12</artifactId>
290                 </exclusion>
291             </exclusions>
292         </dependency>
293         <dependency>
294             <groupId>ch.qos.logback</groupId>
295             <artifactId>logback-classic</artifactId>
296             <version>1.2.3</version>
297             <exclusions>
298                 <exclusion>
299                     <groupId>org.slf4j</groupId>
300                     <artifactId>slf4j-log4j12</artifactId>
301                 </exclusion>
302             </exclusions>
303         </dependency>
304         <dependency>
305             <groupId>com.att.eelf</groupId>
306             <artifactId>eelf-core</artifactId>
307             <version>1.0.1-oss</version>
308             <exclusions>
309                 <exclusion>
310                     <groupId>org.powermock</groupId>
311                     <artifactId>powermock-api-mockito</artifactId>
312                 </exclusion>
313                 <exclusion>
314                     <groupId>org.powermock</groupId>
315                     <artifactId>powermock-module-junit4</artifactId>
316                 </exclusion>
317             </exclusions>
318         </dependency>
319         <!-- End Logging -->
320         <!-- Cassandra -->
321         <dependency>
322         <groupId>io.dropwizard.metrics</groupId>
323         <artifactId>metrics-core</artifactId>
324         <version>4.1.0-rc3</version>
325         </dependency>
326         <dependency>
327         <groupId>com.datastax.cassandra</groupId>
328         <artifactId>cassandra-driver-core</artifactId>
329         <version>3.6.0</version>
330         </dependency>
331          <dependency>
332             <groupId>com.datastax.cassandra</groupId>
333             <artifactId>cassandra-driver-core</artifactId>
334             <version>${cassandra.version}</version>
335            <exclusions>
336         <!-- <exclusion>
337         <groupId>io.netty</groupId>
338         <artifactId>*</artifactId>
339         </exclusion> -->
340     </exclusions>
341         </dependency> 
342         <!-- /Cassandra -->
343         <!-- Jersey -->
344         <dependency>
345             <groupId>com.sun.jersey</groupId>
346             <artifactId>jersey-client</artifactId>
347             <version>${jersey1.version}</version>
348         </dependency>
349         <dependency>
350             <groupId>com.sun.jersey</groupId>
351             <artifactId>jersey-server</artifactId>
352             <version>${jersey1.version}</version>
353         </dependency>
354         <dependency>
355             <groupId>com.sun.jersey</groupId>
356             <artifactId>jersey-json</artifactId>
357             <version>${jersey1.version}</version>
358         </dependency>
359         <dependency>
360             <groupId>com.sun.jersey</groupId>
361             <artifactId>jersey-servlet</artifactId>
362             <version>${jersey1.version}</version>
363         </dependency>
364         <!-- /Jersey -->
365
366         <dependency>
367             <groupId>org.apache.commons</groupId>
368             <artifactId>commons-jcs-core</artifactId>
369             <version>2.2</version>
370         </dependency>
371         <dependency>
372             <groupId>commons-codec</groupId>
373             <artifactId>commons-codec</artifactId>
374             <version>1.11</version>
375         </dependency>
376         <dependency>
377             <groupId>org.apache.commons</groupId>
378             <artifactId>commons-lang3</artifactId>
379             <version>3.8</version>
380         </dependency>
381         <!-- Testing -->
382         <dependency>
383             <groupId>junit</groupId>
384             <artifactId>junit</artifactId>
385             <version>4.12</version>
386             <scope>test</scope>
387         </dependency>
388         <!-- <dependency>
389             <groupId>org.cassandraunit</groupId>
390             <artifactId>cassandra-unit</artifactId>
391             <version>3.3.0.2</version>
392             <scope>test</scope>
393             <exclusions>
394                 <exclusion>
395                     <groupId>io.dropwizard.metrics</groupId>
396                     <artifactId>metrics-core</artifactId>
397                 </exclusion>
398                 <exclusion>
399                     <groupId>com.addthis.metrics</groupId>
400                     <artifactId>reporter-config-base</artifactId>
401                 </exclusion>
402             </exclusions>
403         </dependency> -->
404         <dependency>
405         <groupId>org.cassandraunit</groupId>
406         <artifactId>cassandra-unit-spring</artifactId>
407         <version>3.5.0.1</version>
408         <scope>test</scope>
409         <exclusions>
410             <exclusion>
411                 <groupId>org.slf4j</groupId>
412                 <artifactId>slf4j-log4j12</artifactId>
413             </exclusion>
414             <exclusion>
415                 <groupId>ch.qos.logback</groupId>
416                 <artifactId>logback-core</artifactId>
417             </exclusion>
418             <exclusion>
419                 <groupId>ch.qos.logback</groupId>
420                 <artifactId>logback-classic</artifactId>
421             </exclusion>
422             <exclusion>
423                 <groupId>org.cassandraunit</groupId>
424                 <artifactId>cassandra-unit</artifactId>
425             </exclusion>
426             <exclusion>
427                 <groupId>io.dropwizard.metrics</groupId>
428                 <artifactId>metrics-core</artifactId>
429             </exclusion>
430         </exclusions>
431     </dependency>
432     <dependency>
433             <groupId>org.cassandraunit</groupId>
434             <artifactId>cassandra-unit-shaded</artifactId>
435             <version>3.5.0.1</version>
436             <scope>test</scope>
437         </dependency>
438         <dependency>
439             <groupId>io.dropwizard.metrics</groupId>
440             <artifactId>metrics-core</artifactId>
441             <version>3.1.0</version>
442         </dependency>
443         <dependency>
444             <groupId>org.mockito</groupId>
445             <artifactId>mockito-core</artifactId>
446             <version>2.23.4</version>
447             <scope>test</scope>
448         </dependency>
449         <!--  /Testing -->
450         <dependency>
451             <groupId>com.fasterxml.jackson.core</groupId>
452             <artifactId>jackson-databind</artifactId>
453             </dependency>
454         <dependency>
455                 <groupId>com.fasterxml.jackson.core</groupId>
456                 <artifactId>jackson-core</artifactId>
457                 </dependency>
458         <dependency>
459                 <groupId>com.fasterxml.jackson.core</groupId>
460                 <artifactId>jackson-annotations</artifactId>
461                 </dependency>
462         <dependency>
463             <groupId>org.apache.httpcomponents</groupId>
464             <artifactId>httpclient</artifactId>
465         </dependency>
466         <dependency>
467             <groupId>io.swagger</groupId>
468             <artifactId>swagger-jersey-jaxrs</artifactId>
469             <version>1.5.21</version>
470         </dependency>
471         <dependency>
472             <groupId>com.google.guava</groupId>
473             <artifactId>guava</artifactId>
474         </dependency>
475         <dependency>
476             <groupId>org.mindrot</groupId>
477             <artifactId>jbcrypt</artifactId>
478             <version>0.4</version>
479         </dependency>
480      <dependency>
481         <groupId>org.onap.aaf.authz</groupId>
482         <artifactId>aaf-cadi-aaf</artifactId>
483         <version>2.1.7</version>
484     </dependency>
485     <dependency>
486         <groupId>org.onap.aaf.authz</groupId>
487         <artifactId>aaf-cadi-client</artifactId>
488         <version>2.1.7</version>
489     </dependency>
490     <dependency>
491         <groupId>org.onap.aaf.authz</groupId>
492         <artifactId>aaf-cadi-core</artifactId>
493         <version>2.1.7</version>
494     </dependency>
495
496         <dependency>
497             <groupId>com.google.code.gson</groupId>
498             <artifactId>gson</artifactId>
499             <version>2.8.5</version>
500         </dependency>
501     </dependencies>
502
503     <reporting>
504         <plugins>
505             <plugin>
506                 <groupId>org.apache.maven.plugins</groupId>
507                 <artifactId>maven-javadoc-plugin</artifactId>
508                 <version>2.10.3</version>
509                 <configuration>
510                     <author>true</author>
511                     <breakiterator>true</breakiterator>
512                     <version>true</version>
513                     <links>
514                         <link>https://docs.oracle.com/javase/7/docs/api/</link>
515                         <link>https://tomcat.apache.org/tomcat-7.0-doc/jspapi/</link>
516                         <link>http://docs.oracle.com/javaee/7/api/</link>
517                     </links>
518                 </configuration>
519             </plugin>
520             <plugin>
521                 <groupId>org.apache.maven.plugins</groupId>
522                 <artifactId>maven-compiler-plugin</artifactId>
523                 <configuration>
524                     <source>1.8</source>
525                     <target>1.8</target>
526                 </configuration>
527             </plugin>
528         </plugins>
529     </reporting>
530
531     <profiles>
532         <profile>
533             <id>docker</id>
534             <build>
535                 <plugins>
536                     <plugin>
537                         <groupId>io.fabric8</groupId>
538                         <artifactId>docker-maven-plugin</artifactId>
539                         <version>0.19.1</version>
540                         <configuration>
541                             <verbose>true</verbose>
542                             <apiVersion>1.23</apiVersion>
543                             <registry>nexus3.onap.org:10003</registry>
544                             <images>
545                                 <!-- MUSIC War -->
546                                 <image>
547                                     <name>onap/music/music_sb</name>
548                                     <alias>docker_music</alias>
549                                     <build>
550                                         <cleanup>true</cleanup>
551                                         <tags>
552                                             <tag>${docker.tag}</tag>
553                                             <tag>${docker.latest.tag}</tag>
554                                         </tags>
555                                         <dockerFileDir>${project.basedir}/distribution/music</dockerFileDir>
556 <!--                                    <assembly>
557                                             <descriptorRef>artifact</descriptorRef>
558                                         </assembly>  -->
559                                     </build>
560                                 </image>
561                                 <!-- Cassandra -->
562                                 <image>
563                                     <name>onap/music/cassandra_3_11</name>
564                                     <alias>docker_cassandra_sec</alias>
565                                     <build>
566                                         <cleanup>true</cleanup>
567                                         <tags>
568                                             <tag>${docker.tag}</tag>
569                                             <tag>${docker.latest.tag}</tag>
570                                         </tags>
571                                         <dockerFileDir>${project.basedir}/distribution/cassandra</dockerFileDir>
572                                     </build>
573                                 </image>
574                                 <!-- Cassandra Job -->
575                                 <image>
576                                     <name>onap/music/cassandra_job</name>
577                                     <alias>docker_cassandra_job</alias>
578                                     <build>
579                                         <cleanup>true</cleanup>
580                                         <tags>
581                                             <tag>${docker.tag}</tag>
582                                             <tag>${docker.latest.tag}</tag>
583                                         </tags>
584                                         <dockerFileDir>${project.basedir}/distribution/cassandra_job</dockerFileDir>
585                                     </build>
586                                 </image>
587                                 <!-- Trigger -->
588                                 <image>
589                                     <name>onap/music/musictrigger</name>
590                                     <alias>docker_trigger</alias>
591                                     <build>
592                                         <cleanup>true</cleanup>
593                                         <tags>
594                                             <tag>${docker.tag}</tag>
595                                             <tag>${docker.latest.tag}</tag>
596                                         </tags>
597                                         <dockerFileDir>${project.basedir}/distribution/trigger</dockerFileDir>
598                                     </build>
599                                 </image>
600                                 <!-- tomcat 8.5 -->
601                                 <!-- <image> <name>onap/music/tomcat_music</name>
602                                     <alias>docker_tomcat</alias> <build> <cleanup>true</cleanup> <tags> <tag>8.5-${timestamp}</tag>
603                                     <tag>8.5-latest</tag> </tags> <dockerFileDir>${project.basedir}/distribution/tomcat</dockerFileDir>
604                                     </build> </image>\ -->
605                             </images>
606                         </configuration>
607                         <executions>
608                             <execution>
609                                 <id>clean-images</id>
610                                 <phase>pre-clean</phase>
611                                 <goals>
612                                     <goal>remove</goal>
613                                 </goals>
614                                 <configuration>
615                                     <removeAll>true</removeAll>
616                                     <image>music</image>
617                                 </configuration>
618                             </execution>
619                             <execution>
620                                 <id>generate-images</id>
621                                 <phase>package</phase>
622                                 <goals>
623                                     <goal>build</goal>
624                                 </goals>
625                             </execution>
626                             <execution>
627                                 <id>push-images</id>
628                                 <phase>deploy</phase>
629                                 <goals>
630                                     <goal>push</goal>
631                                 </goals>
632                                 <configuration>
633                                     <image>onap/music/music</image>
634                                 </configuration>
635                             </execution>
636                         </executions>
637                     </plugin>
638                 </plugins>
639             </build>
640         </profile>
641         <profile> 
642               <id>default</id> 
643               <repositories> 
644                   <repository> 
645                     <id>nexus</id> 
646                     <name>attarch-releases</name> 
647                     <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/attarch-releases</url> 
648                 </repository> 
649             </repositories> 
650           </profile>
651     </profiles>
652     <distributionManagement>
653         <repository>
654             <id>ecomp-releases</id>
655             <name>Release Repository</name>
656             <url>${nexusproxy}/${releaseNexusPath}</url>
657         </repository>
658         <snapshotRepository>
659             <id>ecomp-snapshots</id>
660             <name>Snapshot Repository</name>
661             <url>${nexusproxy}/${snapshotNexusPath}</url>
662         </snapshotRepository>
663         <!-- added for javadoc -->
664         <site>
665             <id>ecomp-site</id>
666             <url>dav:${nexusproxy}${sitePath}</url>
667         </site>
668     </distributionManagement>
669 </project>