Upgrade maven-pmd-plugin as part of the Java 17 migration - #1208
Merged
Conversation
Move the `maven-pmd-plugin` upgrade from `UpgradePluginsForJava25` to `UpgradePluginsForJava17`, so that anyone landing on Java 17 or later picks up PMD parser and analyzer fixes. `UpgradeToJava25` chains through `UpgradeToJava21` and `UpgradeToJava17`, so the Java 25 floor of 3.28.x remains covered by the floating `3.x` version.
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.
What's changed?
Moves the
maven-pmd-pluginupgrade fromUpgradePluginsForJava25toUpgradePluginsForJava17, using the floating3.xversion already used there formaven-checkstyle-plugin,maven-compiler-pluginandmaven-war-plugin.Since
UpgradeToJava25→UpgradeToJava21→UpgradeToJava17, the Java 25 floor of3.28.xstays covered; keeping both entries would just be two sources of truth for the same plugin, with the pin being the lower of the two.What's your motivation?
Reported by a customer running the Spring Boot 4 migration (which pulls in
UpgradeToJava17): they still had to hand-bumpmaven-pmd-plugin3.24.0 → 3.28.0 afterwards to get past aStackOverflowErrorin PMD. Pinning the bump to the Java 25 recipe only catches folks going all the way to 25; floating it at the Java 17 level catches PMD parser and analyzer fixes for everyone landing on Java 17 or later.Anything in particular you'd like reviewers to focus on?
maven-pmd-plugin3.22.0 switched from PMD 6.55 to PMD 7.0, so projects still pinned below 3.22 get a major analyzer change: PMD 7 renamed/removed rules and dropped the oldrulesets/java/*.xmlpaths, so custom rulesets can fail to load andpmd:checkcan newly fail.UpgradePluginVersionhas no way to gate on "only if current >= 3.22", and themaven-checkstyle-plugin: 3.xentry already in this recipe accepts the same class of risk, so this seems acceptable — but worth a second opinion.Compatibility checked: 3.28.0 still declares
<javaVersion>8</javaVersion>and<prerequisites><maven>3.6.3</maven></prerequisites>, so no new build floor is imposed.