Skip to content

Commit a96a099

Browse files
tastybentoclaude
andcommitted
Wire Jacoco agent into surefire argLine
Surefire's <argLine> was hard-coded with the --add-opens flags only, which overrode the ${argLine} property that jacoco-maven-plugin:prepare-agent sets to attach the coverage agent. As a result no jacoco.exec was ever produced and SonarCloud reported 0% coverage despite the suite running. Prepending @{argLine} lets Maven late-bind the Jacoco-supplied javaagent flag alongside the existing --add-opens, so coverage now lands in target/site/jacoco/jacoco.xml where the Sonar scanner picks it up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3e04c21 commit a96a099

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@
248248
<include>**/*Test??.java</include>
249249
</includes>
250250
<argLine>
251+
@{argLine}
251252
--add-opens java.base/java.lang=ALL-UNNAMED
252253
--add-opens java.base/java.math=ALL-UNNAMED
253254
--add-opens java.base/java.io=ALL-UNNAMED

0 commit comments

Comments
 (0)