Skip to content

Commit 3741c6f

Browse files
gnodetclaude
andauthored
Bump exec-maven-plugin target to 3.5.0 and fix PLUGIN_UPGRADES inconsistencies (#12200)
- exec-maven-plugin: bump from 3.2.0 to 3.5.0 (3.1.0 and earlier use MavenSession.getContainer() which returns null in Maven 4) - Fix PLUGIN_UPGRADES list: exec-maven-plugin had wrong groupId (org.apache.maven.plugins) and artifactId (maven-exec-plugin) - Fix compiler-plugin min version in PLUGIN_UPGRADES: 3.2.0 → 3.2 (3.2.0 does not exist on Maven Central) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent df007ff commit 3741c6f

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategy.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ public class PluginUpgradeStrategy extends AbstractUpgradeStrategy {
6767

6868
private static final List<PluginUpgrade> PLUGIN_UPGRADES = List.of(
6969
new PluginUpgrade(
70-
DEFAULT_MAVEN_PLUGIN_GROUP_ID, "maven-compiler-plugin", "3.2.0", MAVEN_4_COMPATIBILITY_REASON),
71-
new PluginUpgrade(
72-
DEFAULT_MAVEN_PLUGIN_GROUP_ID, "maven-exec-plugin", "3.2.0", MAVEN_4_COMPATIBILITY_REASON),
70+
DEFAULT_MAVEN_PLUGIN_GROUP_ID, "maven-compiler-plugin", "3.2", MAVEN_4_COMPATIBILITY_REASON),
71+
new PluginUpgrade("org.codehaus.mojo", "exec-maven-plugin", "3.5.0", MAVEN_4_COMPATIBILITY_REASON),
7372
new PluginUpgrade(
7473
DEFAULT_MAVEN_PLUGIN_GROUP_ID, "maven-enforcer-plugin", "3.5.0", MAVEN_4_COMPATIBILITY_REASON),
7574
new PluginUpgrade("org.codehaus.mojo", "flatten-maven-plugin", "1.2.7", MAVEN_4_COMPATIBILITY_REASON),
@@ -237,7 +236,7 @@ private Map<String, PluginUpgradeInfo> getPluginUpgradesMap() {
237236
new PluginUpgradeInfo(DEFAULT_MAVEN_PLUGIN_GROUP_ID, "maven-compiler-plugin", "3.2"));
238237
upgrades.put(
239238
"org.codehaus.mojo:exec-maven-plugin",
240-
new PluginUpgradeInfo("org.codehaus.mojo", "exec-maven-plugin", "3.2.0"));
239+
new PluginUpgradeInfo("org.codehaus.mojo", "exec-maven-plugin", "3.5.0"));
241240
upgrades.put(
242241
DEFAULT_MAVEN_PLUGIN_GROUP_ID + ":maven-enforcer-plugin",
243242
new PluginUpgradeInfo(DEFAULT_MAVEN_PLUGIN_GROUP_ID, "maven-enforcer-plugin", "3.5.0"));

impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategyTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,8 @@ void shouldNotUpgradePluginWithoutVersion() throws Exception {
521521
<build>
522522
<plugins>
523523
<plugin>
524-
<groupId>org.apache.maven.plugins</groupId>
525-
<artifactId>maven-exec-plugin</artifactId>
524+
<groupId>org.codehaus.mojo</groupId>
525+
<artifactId>exec-maven-plugin</artifactId>
526526
<!-- No version - inherited from parent or pluginManagement -->
527527
</plugin>
528528
</plugins>
@@ -553,8 +553,8 @@ void shouldNotUpgradeWhenPropertyNotFound() throws Exception {
553553
<build>
554554
<plugins>
555555
<plugin>
556-
<groupId>org.apache.maven.plugins</groupId>
557-
<artifactId>maven-exec-plugin</artifactId>
556+
<groupId>org.codehaus.mojo</groupId>
557+
<artifactId>exec-maven-plugin</artifactId>
558558
<version>${exec.plugin.version}</version>
559559
</plugin>
560560
</plugins>
@@ -737,7 +737,7 @@ void shouldHavePredefinedPluginUpgrades() throws Exception {
737737
boolean hasCompilerPlugin =
738738
upgrades.stream().anyMatch(upgrade -> "maven-compiler-plugin".equals(upgrade.artifactId()));
739739
boolean hasExecPlugin =
740-
upgrades.stream().anyMatch(upgrade -> "maven-exec-plugin".equals(upgrade.artifactId()));
740+
upgrades.stream().anyMatch(upgrade -> "exec-maven-plugin".equals(upgrade.artifactId()));
741741
boolean hasSurefirePlugin =
742742
upgrades.stream().anyMatch(upgrade -> "maven-surefire-plugin".equals(upgrade.artifactId()));
743743
boolean hasFailsafePlugin =

0 commit comments

Comments
 (0)