Skip to content

[maven-4.0.x] Upgrade plugin dependencies (extra-enforcer-rules) in mvnup#12071

Closed
gnodet wants to merge 1 commit into
maven-4.0.xfrom
backport/maven-4.0.x/pr-12051
Closed

[maven-4.0.x] Upgrade plugin dependencies (extra-enforcer-rules) in mvnup#12071
gnodet wants to merge 1 commit into
maven-4.0.xfrom
backport/maven-4.0.x/pr-12051

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 18, 2026

Backport of #12051 to maven-4.0.x.

Summary

Adds support for upgrading plugin dependencies in mvnup, specifically org.codehaus.mojo:extra-enforcer-rules to minimum version 1.4 for Maven 4 compatibility.

Problem

extra-enforcer-rules versions before 1.4 use DependencyGraphBuilder.buildDependencyGraph(MavenProject, ArtifactFilter) — a method removed in Maven 4. This causes NoSuchMethodError at runtime when rules like BanCircularDependencies are executed.

Found during maven4-testing across ~960 Apache repositories (e.g., rocketmq uses extra-enforcer-rules:1.0-beta-4).

Changes

  • PluginUpgradeStrategy: Added PLUGIN_DEPENDENCY_UPGRADES list and upgradePluginDependencies() method
  • Added 2 tests for plugin dependency upgrades

Claude Code on behalf of Guillaume Nodet

extra-enforcer-rules versions before 1.4 use DependencyGraphBuilder
.buildDependencyGraph(MavenProject, ArtifactFilter) which was removed
in Maven 4. The mvnup plugin upgrade strategy now also checks and
upgrades dependencies declared inside plugin configurations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gnodet gnodet force-pushed the backport/maven-4.0.x/pr-12051 branch from edbf259 to 8470ab7 Compare May 19, 2026 09:05
@gnodet gnodet added this to the 4.0.0-rc-6 milestone May 19, 2026
@gnodet
Copy link
Copy Markdown
Contributor Author

gnodet commented May 19, 2026

Claude Code on behalf of Guillaume Nodet

Closing this PR — the branch conflicts with the domtrip migration (#12082). Reopening as a new PR with the cherry-picked squash commit from the merged master PR #12051.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants