Fix #11796: Preserve cross-lifecycle default phase bindings from components.xml#11890
Open
Fix #11796: Preserve cross-lifecycle default phase bindings from components.xml#11890
Conversation
…onents.xml When a plugin registers a custom lifecycle via components.xml with <default-phases> binding goals to standard lifecycle phases (e.g. process-sources), these cross-lifecycle bindings were silently dropped during the legacy-to-API Lifecycle conversion. The wrap() method only created Phase objects for the custom lifecycle's own phases, losing any bindings to phases from other lifecycles. The fix separates v3phases() (used by computePhases() for phase ordering) from phases() (used by allPhases() for extracting plugin bindings). Cross-lifecycle phase bindings are now included in phases() so they survive the round-trip conversion back to a legacy Lifecycle, while v3phases() returns only the lifecycle's own phases to avoid polluting the phase-to-lifecycle map. 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
<default-phases>fromcomponents.xmlwhen they bind goals to standard lifecycle phases (e.g.process-sources) rather than to the custom lifecycle's own phasesLifecycleWrapperProvider.wrap()method now separatesv3phases()(for phase ordering) fromphases()(for plugin binding extraction), preserving cross-lifecycle bindings during the round-trip conversionCloses #11796
Test plan
testCustomLifecycleWithCrossLifecycleDefaultPhasesverifies cross-lifecycle bindings are preserved🤖 Generated with Claude Code
Claude Code on behalf of Guillaume Nodet