[maven-4.0.x] Add phase upgrade support for Maven 4.1.0 model upgrades#11226
Merged
gnodet merged 1 commit intoapache:maven-4.0.xfrom Oct 9, 2025
Merged
Conversation
This commit implements automatic phase name upgrades when upgrading Maven projects from model version 4.0.0 to 4.1.0. The deprecated Maven 3 phase names are automatically converted to their Maven 4 equivalents: - pre-clean → before:clean - post-clean → after:clean - pre-integration-test → before:integration-test - post-integration-test → after:integration-test - pre-site → before:site - post-site → after:site The upgrade functionality: - Only applies when upgrading to model version 4.1.0 or higher - Processes all plugin executions in build/plugins, build/pluginManagement, and profile/build/plugins sections - Preserves non-deprecated phase names unchanged - Includes comprehensive test coverage for all scenarios This enhancement ensures that Maven projects upgrading to 4.1.0 will automatically have their deprecated phase references updated to use the new Maven 4 phase naming convention. (cherry picked from commit 3660924)
749ba9b to
1ff492c
Compare
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.
Backport
This will backport the following commits from
mastertomaven-4.0.x:Questions ?
Please refer to the Backport tool documentation