[4.0.x] Fix mvnup plugin upgrade for plugins inherited in build/plugins#12159
Closed
gnodet wants to merge 1 commit into
Closed
[4.0.x] Fix mvnup plugin upgrade for plugins inherited in build/plugins#12159gnodet wants to merge 1 commit into
gnodet wants to merge 1 commit into
Conversation
When a remote parent POM declares a plugin with an explicit version in <build><plugins>, adding a <pluginManagement> entry in the child is insufficient to override it. The parent's <plugins> version takes precedence over the child's <pluginManagement>. Now the plugin upgrade strategy adds plugins to both <pluginManagement> (for downstream children) and <build><plugins> (to override the inherited version) when the effective model shows outdated plugins in the build/plugins section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Claude Code on behalf of Guillaume Nodet Closing — the master branch PR (#12157) was superseded by a more precise implementation. Will backport the new version separately. |
3 tasks
Contributor
Author
|
Claude Code on behalf of Guillaume Nodet Superseded by #12165. Will backport separately. |
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
Backport of #12157 to
maven-4.0.x.<build><plugins>(not<pluginManagement>),mvnup's plugin upgrade strategy now adds the plugin to both<pluginManagement>and<build><plugins>in the child project<pluginManagement>entry was added, which is insufficient because the parent's<plugins>version takes precedence over the child's<pluginManagement>Cherry-picked cleanly from master.
Note: The
InheritedPluginDetectionTeststests (includingshouldDetectInheritedPluginsFromRemoteParentwhich existed before this PR) are pre-existing failures onmaven-4.0.x— they fail on the base branch without this change as well.Test plan
🤖 Generated with Claude Code