Update for new code coverage sonarcloud configuration 45/102245/2
authoraosull01 <adrian.osullivan@huawei.com>
Mon, 24 Feb 2020 14:45:56 +0000 (14:45 +0000)
committeraosull01 <adrian.osullivan@huawei.com>
Mon, 24 Feb 2020 14:57:31 +0000 (14:57 +0000)
Issue-ID: EXTAPI-400
Signed-off-by: aosull01 <adrian.osullivan@huawei.com>
Change-Id: I6c13bc0aa2683fe32de7b935b6b54208dee844b8

pom.xml

diff --git a/pom.xml b/pom.xml
index e738f19..7cb6b1c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,7 @@
   <parent>
     <groupId>org.onap.oparent</groupId>
     <artifactId>oparent</artifactId>
-      <version>3.0.0-SNAPSHOT</version>
+      <version>3.0.0</version>
   </parent>
 
   <properties>
     <docker.latest.tag>${project.version}-latest</docker.latest.tag>
     <!--sonar -->
     <sonar.language>java</sonar.language>
-    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
     <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports
     </sonar.surefire.reportsPath>
-    <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec
-    </sonar.jacoco.reportPath>
-    <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec
-    </sonar.jacoco.itReportPath>
+    <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
     <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
     <sonar.projectVersion>${project.version}</sonar.projectVersion>
     <sonar.coverage.exclusions>**/model/**/*</sonar.coverage.exclusions>
           </excludes>
         </configuration>
         <executions>
+          <execution>
+            <id>prepare-agent</id>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+          </execution>
+          <execution>
+             <id>report</id>
+             <goals>
+               <goal>report</goal>
+             </goals>
+             <configuration>
+                <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+             </configuration>
+          </execution>
           <execution>
             <id>pre-unit-test</id>
             <goals>