fix: restore quickfixj-core JaCoCo coverage and exclude generated message modules#1286
Conversation
…odules
- quickfixj-core/pom.xml: prepend @{argLine} in both surefire profile
argLine overrides so the JaCoCo Java agent is actually passed to the
test JVM (previously the profile values replaced the parent's @{argLine}
and no coverage data was collected for core)
- quickfixj-messages/pom.xml: add <skip>true</skip> for jacoco-maven-plugin
so that generated message-class modules are excluded from coverage
entirely, preventing golden-file source-mapping artifacts in Codecov
- pom.xml: remove the broken jacoco report <excludes> pattern that used
filesystem paths instead of class-name patterns and never matched anything
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1286 +/- ##
=============================================
+ Coverage 42.85% 70.22% +27.37%
- Complexity 684 2242 +1558
=============================================
Files 125 163 +38
Lines 3794 9076 +5282
Branches 359 1192 +833
=============================================
+ Hits 1626 6374 +4748
- Misses 2021 2238 +217
- Partials 147 464 +317 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Also maybe.
|
@the-thing good point, but isn't upload prevented anyway since other repo does not have the secret? |
|
Yes, but I don't remember if build fails silently or the whole build fails. |
As suggested by @the-thing #1286 (comment)
|
@the-thing added, thanks. |
Two coverage bugs introduced in #1285:
quickfixj-coretests produced no coverage data, and generated message classes (mapped tosrc/test/resources/golden/source files by Codecov) appeared in the report despite the intent to exclude them.quickfixj-core/pom.xml— JaCoCo agent not reaching the test JVMBoth
surefire-java8andsurefireprofiles override<argLine>with concrete JVM flags but omit@{argLine}. A non-empty child override replaces the parent's value entirely, discarding the JaCoCo agent.quickfixj-basehappened to work because its profiles use an empty<argLine>, which Maven leaves unset and falls back to the parent's@{argLine}.quickfixj-messages/pom.xml— message modules generating unwanted reportsJaCoCo reported coverage for generated
quickfix.fixlatest.*/quickfix.field.*classes. Codecov then resolved theirSourceFileattributes to the identically-named.javafiles undersrc/test/resources/golden/, making those golden files appear as covered source. The existing<excludes>in the root pom was using filesystem paths (quickfixj-messages/quickfixj-messages-*/target/classes/**) — JaCoCo report excludes require class-name patterns — so it never filtered anything.Simplest correct fix: skip JaCoCo entirely for all message sub-modules (generated code, no meaningful coverage value) via their shared parent pom, and remove the broken
<excludes>from the root pom.