gnodet opened a new pull request, #13532:
URL: https://github.com/apache/maven/pull/13532

   ## Summary
   
   - Fix `--builder concurrent package install` silently dropping the `install` 
phase
   - Root cause: `BuildPlan.merge(BuildStep)` preserves the `skip` flag from 
the first plan, so `plan()` silently drops mojos via `addMojo()`'s skip guard
   - The fix: un-skip the surviving step when the merged-in step is active (4 
lines of code)
   
   Fixes #13529
   
   ## Details
   
   `calculateLifecycleMappings` creates steps for ALL lifecycle phases but 
`skip()`s everything beyond the requested phase. When two lifecycle plans are 
merged (e.g., "package" then "install"), the overlapping steps are merged by 
name. The surviving step for `install` retains `skip=true` from the "package" 
plan. Later, `plan()` tries to bind mojos via `addMojo()`, which checks the 
skip flag and silently drops them — so the install phase never executes.
   
   **Note:** `--builder concurrent package javadoc:aggregate-jar install` has a 
separate pre-existing ordering issue where the aggregator goal runs after 
install rather than between package and install. This is due to the lifecycle's 
wrapper phases (`after:ALL`) creating transitive dependencies on all lifecycle 
phases. Fixing that ordering requires a deeper redesign of how non-lifecycle 
steps are inserted into the build plan.
   
   ## Test plan
   
   - [x] New unit test `testMergeUnskipsNonOverlappingPhases` verifying skip 
flag is cleared and install is reachable
   - [x] All 12 existing `BuildPlanCreatorTest` tests pass
   - [x] Manual testing with multi-module reproducer project:
     - `--builder concurrent install` ✅
     - `--builder concurrent package install` ✅ (was broken)
     - `--builder concurrent install package` ✅
     - `--builder concurrent package javadoc:aggregate-jar install` — no 
regression (javadoc still runs after install, same as baseline)
     - `--builder concurrent package javadoc:aggregate-jar` — no regression
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to