Fix mvnup plugin upgrade for plugins inherited in build/plugins#12157
Closed
gnodet wants to merge 1 commit into
Closed
Fix mvnup plugin upgrade for plugins inherited in build/plugins#12157gnodet 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>
3 tasks
Contributor
Author
|
Claude Code on behalf of Guillaume Nodet Closing in favor of a more precise implementation that only adds direct |
3 tasks
Contributor
Author
|
Claude Code on behalf of Guillaume Nodet Superseded by #12165, which uses a more precise approach — comparing effective versions in |
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
<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>maven-enforcer-plugin:1.4.1inherited from a parent's<plugins>section causedNoSuchMethodErrorin Maven 4Test plan
shouldAddDirectBuildPluginsOverrideForInheritedPluginsverifies bothpluginManagementandbuild/pluginsentries are added for inherited pluginsshouldNotDuplicatePluginInBuildPluginsWhenAlreadyDeclaredverifies no duplicates when plugin is already locally declared🤖 Generated with Claude Code