sonarcloud support
[dcaegen2/analytics/tca.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 46f2660..e3f35f9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -2,9 +2,9 @@
 <!--
   ~ ===============================LICENSE_START======================================
   ~  dcae-analytics
-  ~ ================================================================================
-  ~    Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-  ~ ================================================================================
+  ~ ==================================================================================
+  ~    Copyright (c) 2017-2019 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.
   ~   You may obtain a copy of the License at
          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.oparent</groupId>
-               <artifactId>oparent</artifactId>
-               <version>1.0.0-SNAPSHOT</version>
-       </parent>
+    <parent>
+      <groupId>org.onap.oparent</groupId>
+      <artifactId>oparent</artifactId>
+      <version>2.0.0</version>
+      <relativePath/>
+    </parent>
 
     <groupId>org.onap.dcaegen2.analytics.tca</groupId>
     <artifactId>dcae-analytics</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
+    <version>2.3.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>dcaegen2-analytics-tca</name>
         </license>
     </licenses>
 
-    <pluginRepositories>
-       <!-- Black Duck plugin dependencies -->
-               <pluginRepository>
-                       <id>JCenter</id>
-                       <name>JCenter Repository</name>
-                       <url>http://jcenter.bintray.com</url>
-               </pluginRepository>
-               <pluginRepository>
-                       <id>Restlet</id>
-                       <name>Restlet Repository</name>
-                       <url>http://maven.restlet.com</url>
-               </pluginRepository>
-       </pluginRepositories>
-
-    <distributionManagement>
-       <repository>
-                       <id>ecomp-releases</id>
-                       <name>OpenECOMP Release Repository</name>
-                       <url>${nexusproxy}/content/repositories/releases</url>
-               </repository>
-               <snapshotRepository>
-                       <id>ecomp-snapshots</id>
-                       <name>OpenECOMP Snapshot Repository</name>
-                       <url>${nexusproxy}/content/repositories/snapshots</url>
-               </snapshotRepository>
-               <site>
-                       <id>ecomp-site</id>
-                       <url>dav:${nexusproxy}/content/sites/site/org/onap/dcae/apod/analytics/${project.artifactId}/${project.version}/</url>
-               </site>
-    </distributionManagement>
-
     <properties>
 
         <!-- PROJECT SETTINGS-->
@@ -88,7 +57,7 @@
         <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
 
         <!-- PROJECT DEPENDENCIES -->
-        <cdap.version>4.0.0</cdap.version>
+        <cdap.version>4.1.2</cdap.version>
         <cask.common.version>0.7.1</cask.common.version>
         <hadoop.version>2.3.0</hadoop.version>
         <spark.version>1.6.1</spark.version>
         <findbugs.jsr305.version>2.0.1</findbugs.jsr305.version>
         <findbugs.annotations.version>3.0.0</findbugs.annotations.version>
         <lombok.version>1.16.10</lombok.version>
-
+        <jedis.version>2.9.0</jedis.version>
         <json.path.version>2.2.0</json.path.version>
         <quartz.version>2.2.0</quartz.version>
-        <httpclient.version>4.5.2</httpclient.version>
+        <httpclient.version>4.5.5</httpclient.version>
         <commons.lang3.version>3.5</commons.lang3.version>
 
 
         <autorun.plugin.version>1.7</autorun.plugin.version>
         <eclipe.plugin.version>2.10</eclipe.plugin.version>
         <findbugs.plugin.version>3.0.2</findbugs.plugin.version>
-        <cobertura.plugin.version>2.7</cobertura.plugin.version>
         <pmd.plugin.version>3.5</pmd.plugin.version>
         <surefire.report.plugin.version>2.19.1</surefire.report.plugin.version>
-        <checkstyle.plugin.version>2.16</checkstyle.plugin.version>
+        <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
         <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
         <source.plugin.version>2.4</source.plugin.version>
         <jar.plugin.version>2.4</jar.plugin.version>
-        <deploy.plugin.version>2.8</deploy.plugin.version>
-        <jacoco.plugin.version>0.7.7.201606060606</jacoco.plugin.version>
         <lombok.plugin.version>1.16.10.0</lombok.plugin.version>
         <jgitflow.plugin.version>1.0-m5.1</jgitflow.plugin.version>
+        <gitcommitid.plugin.version>2.2.3</gitcommitid.plugin.version>
         <maven.site.plugin>3.5.1</maven.site.plugin>
         <jxr.plugin.version>2.5</jxr.plugin.version>
         <project.info.reports.plugin.version>2.7</project.info.reports.plugin.version>
-        <blackduck.hub.version>2.0.0</blackduck.hub.version>
-        <sonar.plugin.version>3.2</sonar.plugin.version>
-        <license.plugin.version>1.12</license.plugin.version>
 
         <!--PLUGIN SETTINGS -->
         <compiler.source.version>1.7</compiler.source.version>
         <skip.integration.tests>true</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>suppressions.xml</checkstyle.suppression.file.name>
-        <jacoco.it.execution.data.file>${project.build.directory}/coverage-reports/jacoco-it.exec
-        </jacoco.it.execution.data.file>
-        <jacoco.ut.execution.data.file>${project.build.directory}/coverage-reports/jacoco-ut.exec
-        </jacoco.ut.execution.data.file>
         <dependency.locations.enabled>false</dependency.locations.enabled>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
-
+        <snapshots.path>content/repositories/snapshots/</snapshots.path>
+        <releases.path>content/repositories/releases/</releases.path>
+        <site.path>
+            content/sites/site/org/onap/dcaegen2/analytics/tca/${project.artifactId}/${project.version}
+        </site.path>
+       <sonar.coverage.jacoco.xmlReportPaths>
+            ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+        </sonar.coverage.jacoco.xmlReportPaths>
     </properties>
 
     <dependencyManagement>
                 <version>${netty.http.version}</version>
             </dependency>
 
+            <!-- Override Cask and Hadoop default dependency versions for Nexus-IQ scan issues -->
+            <dependency>
+                <groupId>io.netty</groupId>
+                <artifactId>netty</artifactId>
+                <version>3.10.6.Final</version>
+            </dependency>
+
 
             <dependency>
                 <groupId>co.cask.common</groupId>
                 <scope>provided</scope>
             </dependency>
 
+            <!-- DISTRIBUTED CACHING -->
+            <dependency>
+                <groupId>redis.clients</groupId>
+                <artifactId>jedis</artifactId>
+                <version>${jedis.version}</version>
+            </dependency>
 
             <!-- DEPENDENCY INJECTION -->
             <dependency>
                 <artifactId>cdap-unit-test</artifactId>
                 <version>${cdap.version}</version>
                 <scope>test</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>co.cask.cdap</groupId>
+                        <artifactId>cdap-explore-jdbc</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
 
             <dependency>
             </dependency>
 
         </dependencies>
-        
+
     </dependencyManagement>
 
 
     <build>
 
+        <resources>
+            <resource>
+                <directory>${project.basedir}/src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>${project.build.directory}/git</directory>
+            </resource>
+        </resources>
+
         <extensions>
             <extension>
                 <groupId>org.apache.maven.wagon</groupId>
                     <version>${autorun.plugin.version}</version>
                 </plugin>
 
-                <!-- JACOCO CODE COVERAGE PLUGIN -->
-                <plugin>
-                    <groupId>org.jacoco</groupId>
-                    <artifactId>jacoco-maven-plugin</artifactId>
-                    <version>${jacoco.plugin.version}</version>
-                    <configuration>
-                        <excludes>
-                            <!-- Exclude all test classes for code coverage reports -->
-                            <exclude>**/test/**</exclude>
-                            <!-- Exclude all domain classes as they should only contain domain objects, no logic -->
-                            <exclude>**/domain/**</exclude>
-                            <!-- Exclude all facade classes as they should only contain facade objects, no logic -->
-                            <exclude>**/facade/**</exclude>
-                            <!-- Exclude mixin class for code coverage as they are just for json parsing hints -->
-                            <exclude>**/mixin/**</exclude>
-                            <!-- Exclude classes ending with "Constants" as they should only store static constants -->
-                            <exclude>**/*Constants.*</exclude>
-                            <!-- Exclude classes ending with "Module" as they are used for wiring beans by guice -->
-                            <exclude>**/*Module.*</exclude>
-                            <!-- Exclude classes ending with "Exception" as they are mostly wrapper over java
-                            exceptions -->
-                            <exclude>**/*Exception.*</exclude>
-                            <!-- Exclude classes ending with "Entity" as they should not contain any logic -->
-                            <exclude>**/*Entity.*</exclude>
-                        </excludes>
-                    </configuration>
-                    <executions>
-                        <!-- prepare jacoco agent before unit tests -->
-                        <execution>
-                            <id>pre-unit-test</id>
-                            <goals>
-                                <goal>prepare-agent</goal>
-                            </goals>
-                            <configuration>
-                                <destFile>${jacoco.ut.execution.data.file}</destFile>
-                                <propertyName>surefireArgLine</propertyName>
-                            </configuration>
-                        </execution>
-                        <!-- generate unit test coverage report -->
-                        <execution>
-                            <id>post-unit-test</id>
-                            <phase>test</phase>
-                            <goals>
-                                <goal>report</goal>
-                            </goals>
-                            <configuration>
-                                <dataFile>${jacoco.ut.execution.data.file}</dataFile>
-                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
-                            </configuration>
-                        </execution>
-                        <!-- prepare jacoco agent before integration tests -->
-                        <execution>
-                            <id>pre-integration-test</id>
-                            <phase>pre-integration-test</phase>
-                            <goals>
-                                <goal>prepare-agent</goal>
-                            </goals>
-                            <configuration>
-                                <destFile>${jacoco.it.execution.data.file}</destFile>
-                                <propertyName>failsafeArgLine</propertyName>
-                            </configuration>
-                        </execution>
-                        <!-- generate integration test coverage report -->
-                        <execution>
-                            <id>post-integration-test</id>
-                            <phase>post-integration-test</phase>
-                            <goals>
-                                <goal>report</goal>
-                            </goals>
-                            <configuration>
-                                <dataFile>${jacoco.it.execution.data.file}</dataFile>
-                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
-                            </configuration>
-                        </execution>
-                    </executions>
-                </plugin>
-
-
                 <!-- SUREFIRE TEST PLUGIN -->
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     </executions>
                 </plugin>
 
-
                 <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     </executions>
                 </plugin>
 
-
                 <!-- CHECKSTYLE PLUGIN -->
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     </executions>
                 </plugin>
 
+                <!-- GIT COMMIT ID PLUGIN -->
+                <plugin>
+                    <groupId>pl.project13.maven</groupId>
+                    <artifactId>git-commit-id-plugin</artifactId>
+                    <version>${gitcommitid.plugin.version}</version>
+                    <executions>
+                        <execution>
+                            <id>generate-git-properties</id>
+                            <phase>generate-resources</phase>
+                            <goals>
+                                <goal>revision</goal>
+                            </goals>
+                            <configuration>
+                                <failOnNoGitDirectory>false</failOnNoGitDirectory>
+                                <generateGitPropertiesFile>true</generateGitPropertiesFile>
+                                <generateGitPropertiesFilename>
+                                    ${project.build.directory}/git/git.properties
+                                </generateGitPropertiesFilename>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
 
                 <!-- JGIT FLOW PLUGIN -->
-
                 <plugin>
                     <groupId>external.atlassian.jgitflow</groupId>
                     <artifactId>jgitflow-maven-plugin</artifactId>
                     </configuration>
                 </plugin>
 
-
-                <!-- BLACK DUCK LICENSE SCANNER -->
-                <!--
-                <plugin>
-                    <groupId>com.blackducksoftware.integration</groupId>
-                    <artifactId>hub-maven-plugin</artifactId>
-                    <version>${blackduck.hub.version}</version>
-                    <inherited>false</inherited>
-                    <configuration>
-                        <hubProjectName>${project.name}</hubProjectName>
-                        <outputDirectory>${project.basedir}</outputDirectory>
-                        <deployHubBdio>false</deployHubBdio>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>create-bdio-file</id>
-                            <phase>package</phase>
-                            <goals>
-                                <goal>build-bom</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-                -->
-
-                <!-- LICENSE PLUGIN -->
-                <!--
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>license-maven-plugin</artifactId>
-                    <version>${license.plugin.version}</version>
-                    <configuration>
-                        <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
-                        <processStartTag>============LICENSE_START=======================================================</processStartTag>
-                        <processEndTag>============LICENSE_END=========================================================</processEndTag>
-                        <sectionDelimiter>================================================================================</sectionDelimiter>
-                        <licenseName>apache_v2</licenseName>
-                        <inceptionYear>2017</inceptionYear>
-                        <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
-                        <projectName>dcae-analytics</projectName>
-                        <canUpdateCopyright>true</canUpdateCopyright>
-                        <canUpdateDescription>true</canUpdateDescription>
-                        <canUpdateLicense>true</canUpdateLicense>
-                        <emptyLineAfterHeader>true</emptyLineAfterHeader>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>first</id>
-                            <goals>
-                                <goal>update-file-header</goal>
-                            </goals>
-                            <phase>process-sources</phase>
-                        </execution>
-                    </executions>
-                </plugin>
-                -->
-
-                <!-- SONAR PLUGIN -->
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>sonar-maven-plugin</artifactId>
-                    <version>${sonar.plugin.version}</version>
-                </plugin>
-
-                <!-- DEPLOY PLUGIN -->
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>${deploy.plugin.version}</version>
-                </plugin>
-
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-site-plugin</artifactId>
                     <version>${maven.site.plugin}</version>
                 </plugin>
 
-
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-jxr-plugin</artifactId>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <skipTests>true</skipTests>
-                </configuration>
             </plugin>
 
             <plugin>
                 <artifactId>maven-failsafe-plugin</artifactId>
             </plugin>
 
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-            </plugin>
-
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>
                 <artifactId>maven-pmd-plugin</artifactId>
             </plugin>
 
-            <plugin>
+           <!--  <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
             </plugin>
-
+ -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
+                <inherited>false</inherited>
             </plugin>
 
             <plugin>
                 <artifactId>jgitflow-maven-plugin</artifactId>
             </plugin>
 
-            <!--
             <plugin>
-                <groupId>com.blackducksoftware.integration</groupId>
-                <artifactId>hub-maven-plugin</artifactId>
+                <groupId>pl.project13.maven</groupId>
+                <artifactId>git-commit-id-plugin</artifactId>
             </plugin>
-            -->
 
         </plugins>
     </build>
 
-
     <reporting>
         <plugins>
             <plugin>
                     <suppressionsLocation>${checkstyle.suppression.file.name}</suppressionsLocation>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-                <version>${jacoco.plugin.version}</version>
-                <configuration>
-                    <dataFile>${jacoco.ut.execution.data.file}</dataFile>
-                    <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
-                </configuration>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jxr-plugin</artifactId>
         </plugins>
     </reporting>
 
+    <profiles>
+        <profile>
+            <id>doclint-java8-disable</id>
+            <activation>
+                <jdk>[1.8,)</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-javadoc-plugin</artifactId>
+                        <configuration>
+                            <additionalparam>-Xdoclint:none</additionalparam>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <modules>
         <module>dcae-analytics-test</module>
         <module>dcae-analytics-model</module>
         <module>dcae-analytics-cdap-tca</module>
         <module>dcae-analytics-cdap-plugins</module>
         <module>dcae-analytics-it</module>
+        <module>dcae-analytics-aai</module>
     </modules>
 
 </project>