Fix Sonar cloud migration coverage issue 92/101892/1
authorPriyadharshini <priyadharshini.b96@wipro.com>
Tue, 18 Feb 2020 10:52:20 +0000 (10:52 +0000)
committerPriyadharshini <priyadharshini.b96@wipro.com>
Tue, 18 Feb 2020 10:54:11 +0000 (10:54 +0000)
Issue-ID: SO-2663
Signed-off-by: Priyadharshini <priyadharshini.b96@wipro.com>
Change-Id: Ia5c91ed109d5b31f86a3b903123a083bc08733b9

pom.xml

diff --git a/pom.xml b/pom.xml
index 049ee3e..0955338 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <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}/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
+    <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
     <!--sonar.jacoco.itReportPath>${project.mso.base.folder}/packages/arquillian-unit-tests/target/mso-automated-tests/jacoco-it.exec</sonar.jacoco.itReportPath -->
     <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
     <sonar.projectVersion>${project.version}</sonar.projectVersion>
     <sonar.cpd.exclusions>**/*</sonar.cpd.exclusions>
-    <jacoco.version>0.7.5.201505241946</jacoco.version>
+    <jacoco.version>0.8.5</jacoco.version>
     <org.apache.maven.user-settings />
     <openstack.version>1.5.1</openstack.version>
     <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.jacoco</groupId>
-        <artifactId>jacoco-maven-plugin</artifactId>
-        <version>${jacoco.version}</version>
-        <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>
-        </executions>
-      </plugin>
+       <groupId>org.jacoco</groupId>
+       <artifactId>jacoco-maven-plugin</artifactId>
+       <version>${jacoco.version}</version>
+       <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>
+       </executions>
+      </plugin> 
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>license-maven-plugin</artifactId>