From ed33cf027cf59480c8b41c58b2272bdd515d9515 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 3 Sep 2026 06:03:47 +0000 Subject: [PATCH] Update ITs for stricter validation in Maven 3.10.x Adjust version ranges to account for Maven 3.10.x using VALIDATION_LEVEL_MAVEN_3_1 as the strict validation level, which promotes several checks from WARNING to ERROR: - Duplicate plugin/dependency declarations - Banned characters in version and repository IDs - Reserved repository ID 'local' - System scope dependency validation Tests affected: - MavenITmng4005: duplicate dependency -> ERROR for 3.10.0+ - MavenITmng1701: duplicate plugin -> ERROR for 3.10.0+ - MavenITmng3719: skip for 3.10.0+ (relies on duplicate plugin merge) - MavenITmng4379: skip for 3.10.0+ (system scope path validation) - MavenITmng4590: skip for 3.10.0+ (system scope in imported POM) - MavenITmng3586: skip for 3.10.0+ (system scope plugin dependency) - MavenIT0085: skip for 3.10.0+ (transitive system scope) --- .../apache/maven/it/MavenIT0085TransitiveSystemScopeTest.java | 2 +- .../org/apache/maven/it/MavenITmng1701DuplicatePluginTest.java | 2 +- .../maven/it/MavenITmng3586SystemScopePluginDependencyTest.java | 2 +- .../apache/maven/it/MavenITmng3719PomExecutionOrderingTest.java | 2 +- .../apache/maven/it/MavenITmng4005UniqueDependencyKeyTest.java | 2 +- ...ITmng4379TransitiveSystemPathInterpolatedWithEnvVarTest.java | 2 +- ...avenITmng4590ImportedPomUsesSystemAndUserPropertiesTest.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0085TransitiveSystemScopeTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0085TransitiveSystemScopeTest.java index 6f7d0825b..b54386a4e 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0085TransitiveSystemScopeTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0085TransitiveSystemScopeTest.java @@ -27,7 +27,7 @@ public class MavenIT0085TransitiveSystemScopeTest extends AbstractMavenIntegrationTestCase { public MavenIT0085TransitiveSystemScopeTest() { - super(ALL_MAVEN_VERSIONS); + super("(,3.10.0-alpha-1)"); } /** diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1701DuplicatePluginTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1701DuplicatePluginTest.java index f5431e275..e397eff05 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1701DuplicatePluginTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng1701DuplicatePluginTest.java @@ -56,7 +56,7 @@ public void testit() throws Exception { } String logLevel; - if (matchesVersionRange("(,4.0.0-alpha-1)")) { + if (matchesVersionRange("(,3.10.0-alpha-1)")) { logLevel = "WARNING"; } else { logLevel = "ERROR"; diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3586SystemScopePluginDependencyTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3586SystemScopePluginDependencyTest.java index f20a99c0b..1261a2498 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3586SystemScopePluginDependencyTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3586SystemScopePluginDependencyTest.java @@ -34,7 +34,7 @@ public class MavenITmng3586SystemScopePluginDependencyTest extends AbstractMavenIntegrationTestCase { public MavenITmng3586SystemScopePluginDependencyTest() { - super(ALL_MAVEN_VERSIONS); + super("(,3.10.0-alpha-1)"); } /** diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3719PomExecutionOrderingTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3719PomExecutionOrderingTest.java index 775bc360e..ec5388214 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3719PomExecutionOrderingTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3719PomExecutionOrderingTest.java @@ -36,7 +36,7 @@ public class MavenITmng3719PomExecutionOrderingTest extends AbstractMavenIntegrationTestCase { public MavenITmng3719PomExecutionOrderingTest() { - super("[2.0.11,2.1.0-M1),[2.1.0-M2,4.0.0-alpha-1)"); + super("[2.0.11,2.1.0-M1),[2.1.0-M2,3.10.0-alpha-1)"); } /** diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4005UniqueDependencyKeyTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4005UniqueDependencyKeyTest.java index ebff7e8f8..1af8a0ece 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4005UniqueDependencyKeyTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4005UniqueDependencyKeyTest.java @@ -91,7 +91,7 @@ private void test(String project) throws Exception { } String logLevel; - if (matchesVersionRange("(,4.0.0-alpha-1)")) { + if (matchesVersionRange("(,3.10.0-alpha-1)")) { logLevel = "WARNING"; } else { logLevel = "ERROR"; diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4379TransitiveSystemPathInterpolatedWithEnvVarTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4379TransitiveSystemPathInterpolatedWithEnvVarTest.java index 733eeb80b..198666176 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4379TransitiveSystemPathInterpolatedWithEnvVarTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4379TransitiveSystemPathInterpolatedWithEnvVarTest.java @@ -33,7 +33,7 @@ public class MavenITmng4379TransitiveSystemPathInterpolatedWithEnvVarTest extends AbstractMavenIntegrationTestCase { public MavenITmng4379TransitiveSystemPathInterpolatedWithEnvVarTest() { - super("[2.0.3,2.1.0),[3.0-alpha-6,)"); + super("[2.0.3,2.1.0),[3.0-alpha-6,3.10.0-alpha-1)"); } /** diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4590ImportedPomUsesSystemAndUserPropertiesTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4590ImportedPomUsesSystemAndUserPropertiesTest.java index 49419ed81..a5462e5c4 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4590ImportedPomUsesSystemAndUserPropertiesTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4590ImportedPomUsesSystemAndUserPropertiesTest.java @@ -33,7 +33,7 @@ public class MavenITmng4590ImportedPomUsesSystemAndUserPropertiesTest extends AbstractMavenIntegrationTestCase { public MavenITmng4590ImportedPomUsesSystemAndUserPropertiesTest() { - super("[2.0.9,3.0-alpha-1),[3.0-beta-1,)"); + super("[2.0.9,3.0-alpha-1),[3.0-beta-1,3.10.0-alpha-1)"); } /**