Commit 01a1627
CAMEL-23274: Enable JaCoCo coverage in SonarCloud PR analysis (#22468)
The SonarCloud PR analysis always reported 0% coverage because the
sonar-build workflow built with -Dquickly (skipping all tests) and
never activated the coverage profile.
Add a second Maven step that runs core module tests with -Dcoverage,
then generates the aggregated JaCoCo report via the coverage module.
All core source modules are included in the reactor so report-aggregate
can map execution data from camel-core tests to their classes.
Also add ContextValueFactory to the JaCoCo multi-release JAR excludes
in coverage/pom.xml (same issue as the existing CamelThreadFactory
exclude).
Tested locally: produces a 12 MB aggregated report with ~63% line
coverage across 2452 classes in 13 core modules.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent edfd783 commit 01a1627
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2650 | 2650 | | |
2651 | 2651 | | |
2652 | 2652 | | |
| 2653 | + | |
2653 | 2654 | | |
2654 | 2655 | | |
2655 | 2656 | | |
| |||
0 commit comments