Skip to content

[MNG-8604] Fix concurrent builder crash with reactor plugins#11820

Draft
gnodet wants to merge 1 commit intoapache:masterfrom
gnodet:fix/concurrent-builder-reactor-plugins
Draft

[MNG-8604] Fix concurrent builder crash with reactor plugins#11820
gnodet wants to merge 1 commit intoapache:masterfrom
gnodet:fix/concurrent-builder-reactor-plugins

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 21, 2026

Summary

  • Fixes a crash (Step $plan$ not found) when using --builder concurrent on projects where a reactor module is also used as a build plugin (e.g., Apache CXF's cxf-codegen-plugin)
  • Moves reactor plugin ordering logic from calculateLifecycleMappings() to buildInitialPlan(), where PLAN/READY steps already exist
  • Simplifies plugin resolution to only eagerly resolve non-reactor plugins

Details

The root cause is that calculateLifecycleMappings() calls plan.requiredStep(project, PLAN) to set up ordering between reactor plugins and their consuming projects, but the PLAN steps are only created later in buildInitialPlan(). Moving this logic to after the PLAN/READY step creation fixes the crash.

Tested successfully on Apache CXF, Maven Resolver, Commons Lang, and Maven Surefire with -T4 --builder concurrent.

Test plan

  • Existing BuildPlanCreatorTest tests pass
  • Verified on Apache CXF (mvn verify -T4 --builder concurrent) — previously crashed, now builds successfully
  • Verified on Maven Resolver, Commons Lang, Maven Surefire with concurrent builder

🤖 Generated with Claude Code

…s plugin

When using `--builder concurrent`, if a project references a plugin
that is also a module in the reactor (e.g., CXF's codegen-plugin),
the build crashes with "Step $plan$ not found". This happens because
reactor plugin handling in `calculateLifecycleMappings()` calls
`plan.requiredStep(project, PLAN)` before the PLAN steps are created
(they are created later in `buildInitialPlan()`).

Move the reactor plugin ordering logic to `buildInitialPlan()`, after
the PLAN and READY steps have been created. Also simplify the plugin
resolution in `calculateLifecycleMappings()` to only resolve
non-reactor plugins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant