aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChrisC <christophe.closset@intl.att.com>2020-01-27 14:54:56 +0100
committerChrisC <christophe.closset@intl.att.com>2020-01-27 14:55:56 +0100
commit4c4c3fd09235d927e6fc39bc855618da00608b37 (patch)
tree5fadf66123e599368b346fd888ea16b3adba1a2c
parentf332e2e4ce3d8de200fd90076f6d4da8bdade2d6 (diff)
Fix Sonar Java Coverage
SonarCloud takes only XML Jacoco report as input, fixed plugin configuration and sonar properties. Issue-ID: CLAMP-626 Signed-off-by: ChrisC <christophe.closset@intl.att.com> Change-Id: I5d47e3868e3b805d9d45421ba2aa1d71c9626454
-rw-r--r--pom.xml11
1 files changed, 6 insertions, 5 deletions
diff --git a/pom.xml b/pom.xml
index 33bcf15ac..8d6e72c0c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,9 +84,10 @@
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+ <!-- The value below comes from the jacoco maven plugin output, sonar now takes xml only -->
+ <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/jacoco-html-xml-reports/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<!-- <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.build.directory}/site/jacoco</sonar.coverage.jacoco.xmlReportPaths>
<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
<sonar.projectVersion>${project.version}</sonar.projectVersion>
<!-- Enable language to disable javascript analysis -->
@@ -1069,7 +1070,7 @@
<dumpOnExit>true</dumpOnExit>
<append>true</append>
<includes>
- <include>org.onap.clamp.*</include>
+ <include>org/onap/clamp/**</include>
</includes>
</configuration>
<executions>
@@ -1120,9 +1121,9 @@
<goal>report</goal>
</goals>
<configuration>
- <includes>
- <include>org.onap.clamp.*</include>
- </includes>
+ <!-- Setting explicit path, so that we remember where it picks them up from -->
+ <dataFile>${project.build.directory}/jacoco.exec</dataFile>
+ <outputDirectory>${project.build.directory}/jacoco-html-xml-reports</outputDirectory>
</configuration>
</execution>
</executions>