From 57d27132ae2b655a3d4d57c644a17373c8152e4d Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 27 Aug 2026 16:15:43 +0200 Subject: [PATCH 1/4] Don't assume -Ddoclint default Some distributions patch the doclint defaults in OpenJDK, so that don't have to fix hundreds of upstream packages with broken javadoc. So, specify the -Ddoclint=all and don't assume globally valid default. --- .../maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java index 367843935faa..fd59efa1d612 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java @@ -41,6 +41,7 @@ void javadocIsExecutedAndFailed() throws Exception { Verifier verifier = newVerifier(testDir); verifier.deleteDirectory("target"); verifier.addCliArgument("org.apache.maven.plugins:maven-javadoc-plugin:3.6.3:jar"); + verifier.addCliArgument("-Ddoclint=all"); boolean invocationFailed = false; // whatever outcome we do not fail here, but later From b774a3a00ef9bf5a76c80889ca6e028af03e0e62 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 27 Aug 2026 16:16:33 +0200 Subject: [PATCH 2/4] Force download even when the system is set to cache central downloads The difference of builds with caching [ERROR] Non-resolvable parent POM: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): org.apache:apache:pom:33 was not found in https://repo1.maven.org during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced (remote repositories: central (https://repo1.maven.org, default, releases)) and parent could not be found in reactor @ org.apache.maven.its.it0043:maven-it-it0043:1.0-SNAPSHOT, file:///.../its/core-it-suite/target/test-classes/mng-8181-central-repo/pom.xml, line 23, column 3: One or more requests failed org.apache.maven.api.services.model.ModelResolverException: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): org.apache:apache:pom:33 was not found in https://repo1.maven.org during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced (remote repositories: central (https://repo1.maven.org, default, releases)) and without caching [ERROR] Non-resolvable parent POM: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): Could not find artifact org.apache:apache:pom:33 in central (https://repo1.maven.org) (remote repositories: central (https://repo1.maven.org, default, releases)) and parent could not be found in reactor @ org.apache.maven.its.it0043:maven-it-it0043:1.0-SNAPSHOT, file:///.../its/core-it-suite/target/test-classes/mng-8181-central-repo/pom.xml, line 23, column 3: One or more requests failed org.apache.maven.api.services.model.ModelResolverException: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): Could not find artifact org.apache:apache:pom:33 in central (https://repo1.maven.org) (remote repositories: central (https://repo1.maven.org, default, releases)) We are trying to match string that is not present ever when the failure is cached. The closest is the string "central (https://repo1.maven.org, default, releases)" So, for this test, force downloading even if the system preference is caching. --- .../java/org/apache/maven/it/MavenITmng8181CentralRepoTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8181CentralRepoTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8181CentralRepoTest.java index 28c934e5be5e..215dcc3e8206 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8181CentralRepoTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8181CentralRepoTest.java @@ -46,6 +46,7 @@ public void testitModel() throws Exception { verifier.addCliArgument("-Dmaven.repo.local.tail=target/null"); // note: intentionally bad URL, we just want tu ensure that this bad URL is used verifier.addCliArgument("-Dmaven.repo.central=https://repo1.maven.org"); + verifier.addCliArgument("-U"); verifier.addCliArgument("validate"); verifier.setHandleLocalRepoTail(false); // we want isolation to have Maven fail due bad URL assertThrows(VerificationException.class, verifier::execute); From 406f6c59e9ab788e9a3e2052c663fe7de4635c6f Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 27 Aug 2026 21:56:41 +0200 Subject: [PATCH 3/4] Don't leave stray repository inside the sources --- .../apache/maven/it/MavenITmng3955EffectiveSettingsTest.java | 1 + its/core-it-suite/src/test/resources/mng-3955/settings.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3955EffectiveSettingsTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3955EffectiveSettingsTest.java index 77103a0937ea..e3900a57aa0e 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3955EffectiveSettingsTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3955EffectiveSettingsTest.java @@ -46,6 +46,7 @@ public void testitMNG3955() throws Exception { Verifier verifier = newVerifier(testDir); Path localRepo = verifier.getLocalRepository(); verifier.setAutoclean(false); + verifier.deleteDirectory("target"); verifier.addCliArgument("-Dmaven.repo.local.tail=" + localRepo); verifier.addCliArgument("--settings"); verifier.addCliArgument("settings.xml"); diff --git a/its/core-it-suite/src/test/resources/mng-3955/settings.xml b/its/core-it-suite/src/test/resources/mng-3955/settings.xml index 73d5f696e7d9..cf9c202fef25 100644 --- a/its/core-it-suite/src/test/resources/mng-3955/settings.xml +++ b/its/core-it-suite/src/test/resources/mng-3955/settings.xml @@ -20,7 +20,7 @@ under the License. --> - mng-3955 + target/mng-3955 false true From 4a71205ea89ea2c9e4d1c805ad1cfc6d94a20c73 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 27 Aug 2026 21:59:22 +0200 Subject: [PATCH 4/4] Don't fail a subsequent run with FileAlreadyExistsException --- its/core-it-suite/src/test/java/org/apache/maven/it/ItUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/ItUtils.java b/its/core-it-suite/src/test/java/org/apache/maven/it/ItUtils.java index 72bef537c88e..37e952352fda 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/ItUtils.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/ItUtils.java @@ -63,6 +63,7 @@ public static void assertCanonicalFileEquals(Path expected, Path actual) throws } public static void createFile(Path path) throws IOException { + Files.deleteIfExists(path); Files.createFile(path); }