gnodet opened a new pull request, #13559: URL: https://github.com/apache/maven/pull/13559
## Summary - Fix the concurrent builder to un-skip a reactor plugin project's `READY` phase (and its predecessors like `COMPILE`, `RESOURCES`) when another project in the reactor uses that plugin, even if the user requested a phase before `compile` (e.g. `initialize`) - Re-enable the MNG-1088 integration test with `mvn initialize -b concurrent`, preserving the original test's intent of invoking a phase before "compile" ## Background [MNG-1088](https://issues.apache.org/jira/browse/MNG-1088) covers the case where a plugin is built and used within the same multiproject build. The IT was disabled for [MNG-7977](https://issues.apache.org/jira/browse/MNG-7977). PR #13222 re-enables this IT but changes the requested phase from `initialize` to `package`, which breaks the spirit of the test — the original comment says _"It's essential part of the test to invoke a phase before compile"_. ## The problem In `BuildPlanExecutor.buildInitialPlan()`, reactor plugin detection adds an ordering dependency: `consumer.PLAN → pluginProject.READY`. But when the requested phase is `initialize`, `calculateLifecycleMappings` marks all steps after `initialize` as **skipped** (including `COMPILE`, `RESOURCES`, `READY`). The READY step cascades through as empty `EXECUTED` (no mojos), so the consumer's PLAN step runs — but the plugin JAR was never built, and plugin resolution fails. ## The fix After establishing the ordering dependency, un-skip the plugin project's READY step and all its same-project predecessors: ```java readyStep.allPredecessors() .filter(s -> s.project == pluginProject) .forEach(s -> s.skip.set(false)); ``` Since mojos are added later during the PLAN step (via `addMojo()` which checks `!skip.get()`), clearing the skip flag is sufficient — the plugin project's `COMPILE` and `RESOURCES` mojos will be added and executed normally. ## Test plan - [ ] `MavenITmng1088ReactorPluginResolutionTest` passes with `mvn initialize -b concurrent` - [ ] Existing reactor plugin tests still pass - [ ] CI green 🤖 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]
