Skip to content

Commit

Permalink
Enable code coverage again for all modules
Browse files Browse the repository at this point in the history
Overhead should be neglectable for modules not having tests yet
Rely on Sonarcloud default paths for discovering jacoco reports (works
fine even for submodules)
  • Loading branch information
kwin committed Jun 3, 2024
1 parent 9a1b55e commit 6084416
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 33 deletions.
13 changes: 1 addition & 12 deletions org.eclipse.sisu.inject/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<argLine>-Xmx64m --add-opens java.base/java.lang=ALL-UNNAMED @{jacoco.argLine}</argLine>
<argLine>-Xmx64m --add-opens java.base/java.lang=ALL-UNNAMED @{argLine}</argLine>
<classpathDependencyExcludes>
<classpathDependencyExclude>com.google.guava:guava</classpathDependencyExclude>
<classpathDependencyExclude>com.google.inject:guice</classpathDependencyExclude>
Expand Down Expand Up @@ -474,16 +474,5 @@
</plugins>
</build>
</profile>
<profile>
<id>code-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
15 changes: 1 addition & 14 deletions org.eclipse.sisu.plexus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<argLine>-Xmx64m @{jacoco.argLine}</argLine>
<argLine>-Xmx64m @{argLine}</argLine>
<classpathDependencyExcludes>
<classpathDependencyExclude>com.google.guava:guava</classpathDependencyExclude>
<classpathDependencyExclude>com.google.inject:guice</classpathDependencyExclude>
Expand Down Expand Up @@ -441,17 +441,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>code-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
19 changes: 12 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,6 @@
<sisu.licenseHeader>https://raw.githubusercontent.com/eclipse-sisu/sisu-project/main/license-header-epl2.txt</sisu.licenseHeader>
<sisu.licenseYear>${project.inceptionYear}-2024</sisu.licenseYear>

<!-- Jacoco and Sonar -->
<jacoco.argLine />
<sonar.coverage.jacoco.xmlReportPaths>
${maven.multiModuleProjectDirectory}/org.eclipse.sisu.inject/target/site/jacoco/jacoco.xml,
${maven.multiModuleProjectDirectory}/org.eclipse.sisu.plexus/target/site/jacoco/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>

<!-- Versions -->
<mavenRuntimeVersion>3.2.5</mavenRuntimeVersion>
<mavenBuildVersion>3.6.3</mavenBuildVersion>
Expand Down Expand Up @@ -681,5 +674,17 @@ Bundle-DocURL: http://www.eclipse.org/sisu/
</plugins>
</build>
</profile>
<!-- not all sub modules have tests yet, but those additional executions don't do any harm -->
<profile>
<id>code-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 6084416

Please sign in to comment.