[MNG-8604] Fix concurrent builder crash with reactor plugins#11820
Draft
gnodet wants to merge 1 commit intoapache:masterfrom
Draft
[MNG-8604] Fix concurrent builder crash with reactor plugins#11820gnodet wants to merge 1 commit intoapache:masterfrom
gnodet wants to merge 1 commit intoapache:masterfrom
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Step $plan$ not found) when using--builder concurrenton projects where a reactor module is also used as a build plugin (e.g., Apache CXF'scxf-codegen-plugin)calculateLifecycleMappings()tobuildInitialPlan(), where PLAN/READY steps already existDetails
The root cause is that
calculateLifecycleMappings()callsplan.requiredStep(project, PLAN)to set up ordering between reactor plugins and their consuming projects, but the PLAN steps are only created later inbuildInitialPlan(). 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
BuildPlanCreatorTesttests passmvn verify -T4 --builder concurrent) — previously crashed, now builds successfully🤖 Generated with Claude Code