Copy oparent sonar setup 40/101640/3
authorjimmy <jf2512@att.com>
Wed, 12 Feb 2020 21:25:31 +0000 (16:25 -0500)
committerjimmy <jf2512@att.com>
Wed, 12 Feb 2020 21:35:47 +0000 (16:35 -0500)
Issue-ID: AAI-2793
Change-Id: Idd505418feec0021a57deabc54565b78a4e81dd0
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
aai-annotations/pom.xml
aai-auth/pom.xml
aai-common-docker/pom.xml
aai-core/pom.xml
aai-parent/pom.xml
aai-rest/pom.xml
aai-schema-abstraction/pom.xml
aai-schema-ingest/pom.xml
aai-utils/pom.xml
pom.xml
version.properties

index 932454c..b2fc5c4 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.4-SNAPSHOT</version>
+        <version>1.6.5-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-annotations</artifactId>
index 223e1b5..ac1f062 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.4-SNAPSHOT</version>
+        <version>1.6.5-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-auth</artifactId>
index c705596..61f8f0e 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.4-SNAPSHOT</version>
+        <version>1.6.5-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
 
index e5ba732..7ac32cf 100644 (file)
@@ -28,7 +28,7 @@
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-parent</artifactId>
-               <version>1.6.4-SNAPSHOT</version>
+               <version>1.6.5-SNAPSHOT</version>
                <relativePath>../aai-parent/pom.xml</relativePath>
        </parent>
        <artifactId>aai-core</artifactId>
        <packaging>jar</packaging>
        <properties>
                <springframework.version>4.3.24.RELEASE</springframework.version>
-               <sonar.language>java</sonar.language>
-               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
-               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
-               <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/coverage-reports/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
-               <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
-               <sonar.projectVersion>${project.version}</sonar.projectVersion>
+
                <httpclient.version>4.5.5</httpclient.version>
                <jackson.version>2.2.3</jackson.version>
                <eelf.core.version>1.0.1-oss</eelf.core.version>
                <logback.version>1.2.3</logback.version>
                <freemarker.version>2.3.21</freemarker.version>
+
                <jacoco.line.coverage.limit>0.50</jacoco.line.coverage.limit>
                <gremlin.version>3.2.2</gremlin.version>
                <groovy.version>2.4.15</groovy.version>
                        <plugin>
                          <groupId>org.sonarsource.scanner.maven</groupId>
                          <artifactId>sonar-maven-plugin</artifactId>
-                         <version>3.6.1.1688</version>
                        </plugin>
                        <plugin>
-                               <groupId>org.jacoco</groupId>
-                               <artifactId>jacoco-maven-plugin</artifactId>
-                               <version>0.8.5</version>
-                               <configuration>
-                                       <dumpOnExit>true</dumpOnExit>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>jacoco-initialize-unit-tests</id>
-                                               <goals>
-                                                       <goal>prepare-agent</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco.xml</destFile>
-                                                       <!-- <append>true</append> -->
-                                               </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}/coverage-reports/jacoco.xml</dataFile>
-                                                       <!-- Sets the output directory for the code coverage report. -->
-                                                       <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>default-check</id>
-                                               <goals>
-                                                       <goal>check</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <dataFile>${project.build.directory}/coverage-reports/jacoco.xml</dataFile>
-                                                       <rules>
-                                                               <rule implementation="org.jacoco.maven.RuleConfiguration">
-                                                                       <element>BUNDLE</element>
-                                                                       <limits>
-                                                                               <limit implementation="org.jacoco.report.check.Limit">
-                                                                                       <counter>LINE</counter>
-                                                                                       <value>COVEREDRATIO</value>
-                                                                                       <minimum>${jacoco.line.coverage.limit}</minimum>
-                                                                               </limit>
-                                                                       </limits>
-                                                               </rule>
-                                                       </rules>
-                                               </configuration>
-                                       </execution>
-                               </executions>
+                         <groupId>org.jacoco</groupId>
+                         <artifactId>jacoco-maven-plugin</artifactId>
+                         <configuration>
+                           <dumpOnExit>true</dumpOnExit>
+                         </configuration>
+                         <executions>
+                           <execution>
+                             <id>default-prepare-agent</id>
+                             <goals>
+                               <goal>prepare-agent</goal>
+                             </goals>
+                           </execution>
+                           <execution>
+                             <id>default-report</id>
+                             <goals>
+                               <goal>report</goal>
+                             </goals>
+                           </execution>
+                           <execution>
+                             <id>default-check</id>
+                             <goals>
+                               <goal>check</goal>
+                             </goals>
+                             <configuration>
+                               <dataFile>${project.build.directory}/coverage-reports/jacoco.xml</dataFile>
+                               <rules>
+                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
+                                   <element>BUNDLE</element>
+                                   <limits>
+                                     <limit implementation="org.jacoco.report.check.Limit">
+                                       <counter>LINE</counter>
+                                       <value>COVEREDRATIO</value>
+                                       <minimum>${jacoco.line.coverage.limit}</minimum>
+                                     </limit>
+                                   </limits>
+                                 </rule>
+                               </rules>
+                             </configuration>
+                           </execution>
+                         </executions>
                        </plugin>
                        <plugin>
-                               <!-- explicitly define maven-deploy-plugin after other to force exec 
-                                       order -->
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-deploy-plugin</artifactId>
+                         <!-- explicitly define maven-deploy-plugin after other to force exec 
+                              order -->
+                         <groupId>org.apache.maven.plugins</groupId>
+                         <artifactId>maven-deploy-plugin</artifactId>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
index ef0538c..490a385 100644 (file)
@@ -27,7 +27,7 @@
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-common</artifactId>
-               <version>1.6.4-SNAPSHOT</version>
+               <version>1.6.5-SNAPSHOT</version>
        </parent>
        <artifactId>aai-parent</artifactId>
        <name>aai-parent</name>
                <reflections.version>0.9.10</reflections.version>
                <snakeyaml.version>1.25</snakeyaml.version>
                <spring.boot.version>1.5.22.RELEASE</spring.boot.version>
+               <jacoco.version>0.8.5</jacoco.version>
+               <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
+               <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
+               <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+               <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
+               
+               <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
+               
                <spring.web.version>4.3.25.RELEASE</spring.web.version>
                <spring.jms.version>4.3.25.RELEASE</spring.jms.version>
                <spring.test.version>4.3.25.RELEASE</spring.test.version>
                                        <artifactId>docker-maven-plugin</artifactId>
                                        <version>${docker.fabric.version}</version>
                                </plugin>
-                       </plugins>
+                               
+                               <plugin>
+                                 <groupId>org.sonarsource.scanner.maven</groupId>
+                                 <artifactId>sonar-maven-plugin</artifactId>
+                                 <version>${sonar.scanner.version}</version>
+                               </plugin>
 
+                               <plugin>
+                                 <groupId>org.jacoco</groupId>
+                                 <artifactId>jacoco-maven-plugin</artifactId>
+                                 <version>${jacoco.version}</version>
+                                 <configuration>
+                                   <!-- Note: This exclusion list should match <sonar.exclusions>
+                                        property above -->
+                                   <excludes>
+                                     <exclude>**/gen/**</exclude>
+                                     <exclude>**/generated-sources/**</exclude>
+                                     <exclude>**/yang-gen/**</exclude>
+                                     <exclude>**/pax/**</exclude>
+                                   </excludes>
+                                 </configuration>
+                                 <executions>
+                                   <!--
+                                       Prepares the property pointing to the JaCoCo runtime agent which
+                                       is passed as VM argument when Maven the Surefire plugin is executed.
+                                   -->
+                                   <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}/code-coverage/jacoco-ut.exec</destFile>
+                                       <!--
+                                           Sets the name of the property containing the settings
+                                           for JaCoCo runtime agent.
+                                       -->
+                                       <propertyName>surefireArgLine</propertyName>
+                                     </configuration>
+                                   </execution>
+                                   <!--
+                                       Ensures that the code coverage report for unit tests is created after
+                                       unit tests have been run.
+                                   -->
+                                   <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}/code-coverage/jacoco-ut.exec</dataFile>
+                                       <!-- Sets the output directory for the code coverage report. -->
+                                       <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}/code-coverage/jacoco-it.exec</destFile>
+                                       <!--
+                                           Sets the name of the property containing the settings
+                                           for JaCoCo runtime agent.
+                                       -->
+                                       <propertyName>failsafeArgLine</propertyName>
+                                     </configuration>
+                                   </execution>
+                                   <!--
+                                       Ensures that the code coverage report for integration tests after
+                                       integration tests have been run.
+                                   -->
+                                   <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}/code-coverage/jacoco-it.exec</dataFile>
+                                       <!-- Sets the output directory for the code coverage report. -->
+                                       <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+                                     </configuration>
+                                   </execution>
+                           </executions>
+                         </plugin>
+                       </plugins>
                </pluginManagement>
        </build>
 
index c271ccc..d2716c0 100644 (file)
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.4-SNAPSHOT</version>
+        <version>1.6.5-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-rest</artifactId>
index fb21264..581a36b 100644 (file)
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.onap.aai.aai-common</groupId>
     <artifactId>aai-parent</artifactId>
-    <version>1.6.4-SNAPSHOT</version>
+    <version>1.6.5-SNAPSHOT</version>
     <relativePath>../aai-parent/pom.xml</relativePath>
   </parent>
   
index c684d9d..d5e20ea 100644 (file)
@@ -15,7 +15,7 @@
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-parent</artifactId>
-               <version>1.6.4-SNAPSHOT</version>
+               <version>1.6.5-SNAPSHOT</version>
                <relativePath>../aai-parent/pom.xml</relativePath>
        </parent>
        <artifactId>aai-schema-ingest</artifactId>
index 8c7eba9..1930e98 100644 (file)
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.4-SNAPSHOT</version>
+        <version>1.6.5-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index f5e9a7d..9253a49 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
 
     <groupId>org.onap.aai.aai-common</groupId>
     <artifactId>aai-common</artifactId>
-    <version>1.6.4-SNAPSHOT</version>
+    <version>1.6.5-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>aai-aai-common</name>
     <description>Contains all of the common code for resources and traversal repos</description>
index fc0709c..716f7d4 100644 (file)
@@ -5,7 +5,7 @@
 
 major_version=1
 minor_version=6
-patch_version=4
+patch_version=5
 
 base_version=${major_version}.${minor_version}.${patch_version}