gnodet opened a new pull request, #11889: URL: https://github.com/apache/maven/pull/11889
## Summary - Fixes [#11796](https://github.com/apache/maven/issues/11796): Maven 4 ignores `<default-phases>` from `components.xml` when plugin goals are bound to standard lifecycle phases (e.g., `process-sources`) - The root cause was in `LifecycleWrapperProvider.wrap()` which only created `Phase` objects for the custom lifecycle's own phase names, ignoring `defaultPhases` entries that reference standard lifecycle phases - The fix includes the `defaultPhases` entries for standard phases as additional phases in the wrapped API `Lifecycle`, and overrides `v3phases()` to return only the custom lifecycle's own phases (so `computePhases()` is unaffected) ## Changes - **`DefaultLifecycleRegistry.java`**: Modified `LifecycleWrapperProvider.wrap()` to include `defaultPhases` entries for standard lifecycle phases in `phases()`, overrides `v3phases()` to isolate custom phases - **`DefaultLifecyclesTest.java`**: Added unit test verifying custom lifecycle default-phases bindings to standard phases are preserved - **Integration test**: Added `MavenITmng11796DefaultPhasesStandardLifecycleTest` with reproducer plugin and consumer project ## Test plan - [x] All 544 maven-core unit tests pass - [x] All 28 lifecycle-related tests pass (including 1 new) - [x] Existing MNG-8299 custom lifecycle behavior is unaffected - [ ] CI passes - [ ] Integration test verifies touch goal executes at `process-sources` phase via `mvn compile` _Claude Code on behalf of Guillaume Nodet_ -- 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]
