gnodet opened a new pull request, #12157: URL: https://github.com/apache/maven/pull/12157
## Summary - When a remote parent POM declares a plugin with an explicit version in `<build><plugins>` (not `<pluginManagement>`), `mvnup`'s plugin upgrade strategy now adds the plugin to **both** `<pluginManagement>` and `<build><plugins>` in the child project - Previously, only a `<pluginManagement>` entry was added, which is insufficient because the parent's `<plugins>` version takes precedence over the child's `<pluginManagement>` - This fixes the scenario described in the ratis-hadoop-projects issue where `maven-enforcer-plugin:1.4.1` inherited from a parent's `<plugins>` section caused `NoSuchMethodError` in Maven 4 ## Test plan - [x] New test `shouldAddDirectBuildPluginsOverrideForInheritedPlugins` verifies both `pluginManagement` and `build/plugins` entries are added for inherited plugins - [x] New test `shouldNotDuplicatePluginInBuildPluginsWhenAlreadyDeclared` verifies no duplicates when plugin is already locally declared - [x] All 29 existing + new PluginUpgradeStrategy tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
