TCAGen2 java upgrade
[dcaegen2/analytics/tca-gen2.git] / dcae-analytics / pom.xml
index 6f437b5..c419983 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~ ================================================================================
-  ~ Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+  ~ Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
   ~ ================================================================================
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
-       
+
        <parent>
-               <groupId>org.onap.dcaegen2</groupId>
-               <artifactId>tca-gen2</artifactId>
-               <version>3.0.0-SNAPSHOT</version>
+               <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
+               <artifactId>tca-gen2-parent</artifactId>
+               <version>1.2.0-SNAPSHOT</version>
        </parent>
 
-    <groupId>org.onap.dcaegen2.analytics</groupId>
     <artifactId>dcae-analytics</artifactId>
-    <version>3.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>DCAE Analytics Parent</name>
         <main.basedir>${project.basedir}</main.basedir>
 
         <!-- DEPENDENCIES VERSION -->
-        <eelf.logger.version>3.0.0-SNAPSHOT</eelf.logger.version>
-        <spring.boot.version>2.0.1.RELEASE</spring.boot.version>
+        <eelf.logger.version>1.0.1-SNAPSHOT</eelf.logger.version>
+        <spring.boot.version>2.0.9.RELEASE</spring.boot.version>
         <spring.cloud.version>Finchley.RC2</spring.cloud.version>
+        <spring.version>5.0.11.RELEASE</spring.version>
         <commons.text.version>1.4</commons.text.version>
         <springfox-swagger2.version>2.9.2</springfox-swagger2.version>
         <findbugs.jsr305.version>3.0.2</findbugs.jsr305.version>
         <findbugs.annotations.version>3.0.1</findbugs.annotations.version>
 
         <!-- TEST DEPENDENCIES -->
-        <junit-jupiter.version>5.0.2</junit-jupiter.version>
-        <junit-platform.version>1.0.2</junit-platform.version>
+        <junit-jupiter.version>5.6.2</junit-jupiter.version>
+        <junit-platform.version>1.6.2</junit-platform.version>
         <apiguardian-api.version>1.0.0</apiguardian-api.version>
 
         <!--TEST SETTINGS -->
         <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
         <!-- PLUGINS VERSIONS -->
-        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
+        <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
         <maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
-        <maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
-        <maven-surefire-plugin.version>2.19</maven-surefire-plugin.version>
-        <maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
+        <maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
+        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
+        <maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
         <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
         <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
         <jacoco.plugin.version>0.8.1</jacoco.plugin.version>
-        <findbugs.plugin.version>3.0.5</findbugs.plugin.version>
-        <pmd.plugin.version>3.8</pmd.plugin.version>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+        </sonar.coverage.jacoco.xmlReportPaths>
+        <pmd.plugin.version>3.11.0</pmd.plugin.version>
         <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
-        <lombok.plugin.version>1.16.18.1</lombok.plugin.version>
+        <lombok.plugin.version>1.18.0.0</lombok.plugin.version>
         <gitcommitid.plugin.version>2.2.3</gitcommitid.plugin.version>
         <maven.build.helper.plugin.version>3.0.0</maven.build.helper.plugin.version>
-        <dockerfile-maven-version>1.4.3</dockerfile-maven-version>
+           <docker-maven-version>1.0.0</docker-maven-version>
 
         <!--PLUGIN SETTINGS -->
-        <compiler.source.version>1.8</compiler.source.version>
-        <compiler.target.version>1.8</compiler.target.version>
+        <compiler.source.version>11</compiler.source.version>
+        <compiler.target.version>11</compiler.target.version>
         <unit.test.pattern>**/*Test.java</unit.test.pattern>
         <skip.unit.tests>false</skip.unit.tests>
         <integration.test.pattern>**/*IT.java</integration.test.pattern>
         <skip.integration.tests>false</skip.integration.tests>
         <pmd.violation.buildfail>true</pmd.violation.buildfail>
         <findbugs.failOnError>true</findbugs.failOnError>
-        <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
+        <checkstyle.failOnViolation>false</checkstyle.failOnViolation>
         <checkstyle.file.name>checkstyle.xml</checkstyle.file.name>
         <checkstyle.suppression.file.name>checkstyle-suppressions.xml</checkstyle.suppression.file.name>
 
         <snapshots.path>content/repositories/snapshots/</snapshots.path>
         <releases.path>content/repositories/releases/</releases.path>
         <docker.repository>nexus3.onap.org:10003</docker.repository>
+        <jackson.version>2.11.0</jackson.version>
+        <undertow.version>2.0.27</undertow.version>
+        <spring-webflux.version>5.2.7.RELEASE</spring-webflux.version>
+        <spring-swagger-ui.version>2.10.5</spring-swagger-ui.version>
+
+        <!-- SONAR EXCLUSIONS -->
+        <!-- EXCLUDE TEST COVERAGE ON
+          TEST PACKAGES - USED FOR TESTING - NOT FOR DEPLOYMENT
+          MODEL PACKAGES - MODELS ONLY CONTAINS POJOs AND NO BUSINESS LOGIC,
+          CONFIG PACKAGE -  CONTAINS WIRINGS OF SPRING BEANS,
+          EXCEPTIONS PACKAGE - CONTAINS CUSTOM EXCEPTIONS - NO BUSINESS LOGIC,
+          PREFERENCES CLASSES - JUST POJOS
+          CONTEXTS CLASSES - JUST POJOS
+          ENTITY CLASSES - JUST POJOS
+          -->
+        <sonar.coverage.exclusions>**/test/**,**/model/**,**/config/**,**/exception/**,**/*Preferences.java,**/*Context*.java,**/*Entity.java</sonar.coverage.exclusions>
 
     </properties>
 
-  
+
 
     <dependencyManagement>
 
 
             <!-- PROJECT DEPENDENCIES -->
             <dependency>
-                <groupId>org.onap.dcaegen2.analytics</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>dcae-analytics-test</artifactId>
                 <version>${project.version}</version>
                 <scope>test</scope>
             </dependency>
 
             <dependency>
-                <groupId>org.onap.dcaegen2.analytics</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>dcae-analytics-model</artifactId>
                 <version>${project.version}</version>
             </dependency>
 
             <dependency>
-                <groupId>org.onap.dcaegen2.analytics</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>dcae-analytics-web</artifactId>
                 <version>${project.version}</version>
             </dependency>
 
             <dependency>
-                <groupId>org.onap.dcaegen2.analytics</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>dcae-analytics-tca-model</artifactId>
                 <version>${project.version}</version>
             </dependency>
 
             <dependency>
-                <groupId>org.onap.dcaegen2.analytics</groupId>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>dcae-analytics-tca-core</artifactId>
                 <version>${project.version}</version>
             </dependency>
 
-
             <!-- EELF LOGGER -->
             <dependency>
-                <groupId>org.onap.dcaegen2.analytics</groupId>
+                <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
                 <artifactId>eelf-logger-logback-impl</artifactId>
-                <version>${eelf.logger.version}</version>
+                <version>${project.version}</version>
             </dependency>
 
             <!-- UTILITIES -->
             <dependency>
                 <groupId>io.springfox</groupId>
                 <artifactId>springfox-swagger-ui</artifactId>
-                <version>${springfox-swagger2.version}</version>
+                <version>${spring-swagger-ui.version}</version>
             </dependency>
 
             <!-- FIND BUGS -->
                 <version>${junit-jupiter.version}</version>
                 <scope>test</scope>
             </dependency>
+                   <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.13</version>
+                       <scope>test</scope>
+                   </dependency>
+                   <dependency>
+                       <groupId>org.junit.vintage</groupId>
+                       <artifactId>junit-vintage-engine</artifactId>
+                       <version>5.6.2</version>
+                       <scope>test</scope>
+                   </dependency>
             <dependency>
                 <groupId>org.junit.platform</groupId>
                 <artifactId>junit-platform-engine</artifactId>
-                <version>${junit-platform.version}</version>
+                <version>1.6.2</version>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.junit.platform</groupId>
                 <artifactId>junit-platform-launcher</artifactId>
-                <version>${junit-platform.version}</version>
+                <version>1.6.2</version>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-dependencies</artifactId>
                 <version>${spring.boot.version}</version>
+              <exclusions>
+                <exclusion>
+                  <groupId>org.springframework</groupId>
+                  <artifactId>spring-web</artifactId>
+                </exclusion>
+                <exclusion>
+                           <groupId>org.springframework.boot</groupId>
+                           <artifactId>spring-boot-starter-test</artifactId>
+                </exclusion>
+                <exclusion>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-core</artifactId>
+                </exclusion>
+                <exclusion>
+                               <groupId>io.undertow</groupId>
+                               <artifactId>undertow-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-webflux</artifactId>
+                </exclusion>
+                <exclusion>
+                           <groupId>com.fasterxml.jackson.core</groupId>
+                           <artifactId>jackson-databind</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-core</artifactId>
+                </exclusion>
+                <exclusion>
+                           <groupId>com.fasterxml.jackson.dataformat</groupId>
+                           <artifactId>jackson-dataformat-smile</artifactId>
+                </exclusion>
+              </exclusions>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
+                       <dependency>
+                           <groupId>org.springframework</groupId>
+                           <artifactId>spring-webflux</artifactId>
+                           <version>${spring-webflux.version}</version>
+                       </dependency>
+          <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>${spring.version}</version>
+          </dependency>
+          <dependency>
+             <groupId>org.springframework.boot</groupId>
+             <artifactId>spring-boot-starter-test</artifactId>
+            <version>2.2.0.RELEASE</version>
+          </dependency>
+          <dependency>
+                <groupId>org.mockito</groupId>
+                <artifactId>mockito-core</artifactId>
+                <version>2.23.4</version>
+          </dependency>
+             <dependency>
+               <groupId>io.undertow</groupId>
+               <artifactId>undertow-core</artifactId>
+               <version>2.0.27.Final</version>
+             </dependency>
+               <dependency>
+                   <groupId>com.fasterxml.jackson.core</groupId>
+                   <artifactId>jackson-databind</artifactId>
+                <version>${jackson.version}</version>
+               </dependency>
+               <dependency>
+                           <groupId>com.fasterxml.jackson.core</groupId>
+                           <artifactId>jackson-core</artifactId>
+                           <version>${jackson.version}</version>
+            </dependency>
+                       <dependency>
+                          <groupId>com.fasterxml.jackson.dataformat</groupId>
+                          <artifactId>jackson-dataformat-smile</artifactId>
+                          <version>${jackson.version}</version>
+                       </dependency>
 
         </dependencies>
     </dependencyManagement>
                             <exclude>${integration.test.pattern}</exclude>
                         </excludes>
                     </configuration>
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.junit.platform</groupId>
-                            <artifactId>junit-platform-surefire-provider</artifactId>
-                            <version>${junit-platform.version}</version>
-                        </dependency>
-                    </dependencies>
                 </plugin>
 
                 <!-- FAIL SAFE PLUGIN FOR INTEGRATION TEST -->
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-failsafe-plugin</artifactId>
                     <version>${maven-failsafe-plugin.version}</version>
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.junit.platform</groupId>
-                            <artifactId>junit-platform-surefire-provider</artifactId>
-                            <version>${junit-platform.version}</version>
-                        </dependency>
-                    </dependencies>
                     <executions>
                         <execution>
                             <id>integration-tests</id>
                     </executions>
                 </plugin>
 
-
-                <plugin>
-                    <groupId>org.jacoco</groupId>
-                    <artifactId>jacoco-maven-plugin</artifactId>
-                    <version>${jacoco.plugin.version}</version>
-                    <configuration>
-                        <excludes>
-                            <exclude>**/generated/**</exclude>
-                            <exclude>**/generated-sources/**</exclude>
-                        </excludes>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>pre-unit-test</id>
-                            <goals>
-                                <goal>prepare-agent</goal>
-                            </goals>
-                            <configuration>
-                                <!-- Sets the path to the file which contains the execution data. -->
-                                <destFile>${project.build.directory}/jacoco/jacoco-ut.exec</destFile>
-                                <propertyName>surefireArgLine</propertyName>
-                            </configuration>
-                        </execution>
-                        <execution>
-                            <id>post-unit-test</id>
-                            <phase>test</phase>
-                            <goals>
-                                <goal>report</goal>
-                            </goals>
-                            <configuration>
-                                <!-- Sets the path to the file which contains the execution data. -->
-                                <dataFile>${project.build.directory}/jacoco/jacoco-ut.exec</dataFile>
-                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
-                            </configuration>
-                        </execution>
-                        <execution>
-                            <id>pre-integration-test</id>
-                            <phase>pre-integration-test</phase>
-                            <goals>
-                                <goal>prepare-agent</goal>
-                            </goals>
-                            <configuration>
-                                <!-- Sets the path to the file which contains the execution data. -->
-                                <destFile>${project.build.directory}/jacoco/jacoco-it.exec</destFile>
-                                <propertyName>failsafeArgLine</propertyName>
-                            </configuration>
-                        </execution>
-                        <execution>
-                            <id>post-integration-test</id>
-                            <phase>post-integration-test</phase>
-                            <goals>
-                                <goal>report</goal>
-                            </goals>
-                            <configuration>
-                                <!-- Sets the path to the file which contains the execution data. -->
-                                <dataFile>${project.build.directory}/jacoco/jacoco-it.exec</dataFile>
-                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
-                            </configuration>
-                        </execution>
-                    </executions>
-
-                </plugin>
-
-                <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>findbugs-maven-plugin</artifactId>
-                    <version>${findbugs.plugin.version}</version>
-                    <configuration>
-                        <effort>Max</effort>
-                        <threshold>Low</threshold>
-                        <xmlOutput>true</xmlOutput>
-                        <!-- BUILD FAIL ON FINDBUGS ERRORS -->
-                        <failOnError>${findbugs.failOnError}</failOnError>
-                        <excludeFilterFile>${main.basedir}/findbugs-exclude.xml</excludeFilterFile>
-                        <outputDirectory>${project.reporting.outputDirectory}/findbugs</outputDirectory>
-                        <findbugsXmlOutputDirectory>${project.reporting.outputDirectory}/findbugs
-                        </findbugsXmlOutputDirectory>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>analyze-compile</id>
-                            <phase>compile</phase>
-                            <goals>
-                                <goal>check</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-
                 <!-- PMD PLUGIN SETUP -->
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                             <id>validate</id>
                             <phase>validate</phase>
                             <configuration>
+                                   <skip>true</skip>
                                 <configLocation>${checkstyle.file.name}</configLocation>
                                 <suppressionsLocation>${checkstyle.suppression.file.name}</suppressionsLocation>
                                 <encoding>UTF-8</encoding>
                 </plugin>
 
                 <!-- DOCKER PLUGIN -->
+               <!--
                 <plugin>
                     <groupId>com.spotify</groupId>
-                    <artifactId>dockerfile-maven-plugin</artifactId>
-                    <version>${dockerfile-maven-version}</version>
+                    <artifactId>docker-maven-plugin</artifactId>
+                    <version>${docker-maven-version}</version>
                     <configuration>
-                        <repository>${docker.repository}/${project.artifactId}</repository>
+                        <repository>${docker.repository}/onap/${project.groupId}.${project.artifactId}</repository>
                         <tag>${project.version}</tag>
                     </configuration>
                 </plugin>
+               -->
 
             </plugins>
 
                 <artifactId>maven-pmd-plugin</artifactId>
             </plugin>
 
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-            </plugin>
-
-            <plugin>
+           <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
-            </plugin>
+           </plugin> 
 
             <plugin>
                 <groupId>org.jacoco</groupId>