Skip to content

Fix(build): Bump maven-build-action to v0.4.0 - #41

Merged
askb merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/maven-build-action-v040
Aug 27, 2026
Merged

Fix(build): Bump maven-build-action to v0.4.0#41
askb merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/maven-build-action-v040

Conversation

@ModeSevenIndustrialSolutions

Copy link
Copy Markdown
Contributor

Problem

Multi-module (multi-subproject) Maven reactors get structurally wrong coverage from the run_jacoco path: Maven completes each subproject's lifecycle before starting the next, so each subproject's report runs before downstream subprojects' tests execute. Cross-module attribution is lost, and the badge, step summary and coverage/branch_coverage outputs under-report. Tracked in #28.

Fix

Bump maven-build-action v0.3.1 → v0.4.0, which fixes this inside the action:

  • jacoco-mode defaults to auto: every subproject's agent writes one execution-data file and the report goal reruns after the reactor completes, so each subproject's report covers its classes with data from every subproject's tests
  • Backs off entirely when the caller or project supplies its own JaCoCo coordinates, sets jacoco.append=false, or requests a parallel reactor (checked across mvn-params, mvn-opts, MAVEN_ARGS and .mvn/maven.config)
  • Also brings allowlisted workspace variable expansion in mvn-params (restores Jenkins-era $WORKSPACE behaviour)

This lane already passes run-jacoco, so the pin bump delivers the aggregation with no input changes. The security-workflows scan lanes adopted v0.4.0 in their v0.3.1 release (lfreleng-actions/security-workflows#53); this aligns the standard build lane with them — the last consumer on the broken version.

Validation

  • Pin verified: 4fe48909… is the commit SHA the signed v0.4.0 tag dereferences to
  • zizmor --persona=auditor on the changed workflow: zero findings
  • aislop ci --changes: 0 errors / 0 warnings
  • prek hooks (actionlint, yamllint, gitlint, workflow validators): all pass

Fixes #28

Multi-module (multi-subproject) Maven reactors get structurally
wrong coverage from the run_jacoco path: each subproject's report
runs before downstream subprojects' tests execute, so cross-module
attribution is lost and the badge, summary and coverage outputs
under-report.

maven-build-action v0.4.0 fixes this inside the action: jacoco-mode
defaults to auto, pointing every subproject's agent at one
execution-data file and rerunning the report goal after the reactor
completes, backing off when the project or caller arranges its own
coverage or requests a parallel reactor. This lane already passes
run-jacoco, so bumping the pin delivers the aggregation with no
input changes. The bump also brings workspace variable expansion in
mvn-params, restoring Jenkins-era behaviour for callers passing
workspace-anchored paths.

The security-workflows scan lanes adopted v0.4.0 in their v0.3.1
release; this aligns the standard build lane with them.

Fixes lfreleng-actions#28

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions requested review from a team and a balanced review from Copilot August 27, 2026 11:59
@github-actions github-actions Bot added the bug Something isn't working label Aug 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Maven build workflow to fix multi-module JaCoCo coverage aggregation.

Changes:

  • Bumps maven-build-action from v0.3.1 to signed v0.4.0.
  • Retains existing workflow inputs and coverage outputs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@askb
askb merged commit 74b8388 into lfreleng-actions:main Aug 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-module Maven coverage under-reported by run_jacoco path

3 participants