Skip to content

Commit

Permalink
Merge pull request #1000 from cdk/jacoco-sonar-path
Browse files Browse the repository at this point in the history
SonarCloud is not reporting test coverage correctly because it was no…
  • Loading branch information
johnmay committed Aug 24, 2023
2 parents c84c11b + b6e27b5 commit a7da7c0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
20 changes: 20 additions & 0 deletions bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,5 +376,25 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>jacoco</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>aggregate-report</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
10 changes: 2 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.organization>cdk</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/bundle/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>
<licenses>
<license>
Expand Down Expand Up @@ -842,14 +843,7 @@
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>aggregate-report</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</execution>
</executions>
</plugin>
</plugins>
Expand Down

0 comments on commit a7da7c0

Please sign in to comment.