You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2026/08/28 21:37:28 UTC

(maven) branch master updated: Minor fixes for integration tests (#12871)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new e53b7bd98f Minor fixes for integration tests (#12871)
e53b7bd98f is described below

commit e53b7bd98f7352a90af8795af75a2f4c5d3f179c
Author: Fridrich Strba <fr...@users.noreply.github.com>
AuthorDate: Fri Aug 28 23:37:22 2026 +0200

    Minor fixes for integration tests (#12871)
    
    * 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.
    
    * 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.
    
    * Don't leave stray repository inside the sources
    
    * Don't fail a subsequent run with FileAlreadyExistsException
---
 its/core-it-suite/src/test/java/org/apache/maven/it/ItUtils.java        | 1 +
 .../java/org/apache/maven/it/MavenITmng3955EffectiveSettingsTest.java   | 1 +
 .../org/apache/maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java  | 1 +
 .../test/java/org/apache/maven/it/MavenITmng8181CentralRepoTest.java    | 1 +
 its/core-it-suite/src/test/resources/mng-3955/settings.xml              | 2 +-
 5 files changed, 5 insertions(+), 1 deletion(-)

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 72bef537c8..37e952352f 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);
     }
 
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 77103a0937..e3900a57aa 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/java/org/apache/maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7967ArtifactHandlerLanguageTest.java
index 367843935f..fd59efa1d6 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
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 28c934e5be..215dcc3e82 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);
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 73d5f696e7..cf9c202fef 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.
 -->
 
 <settings xmlns='http://maven.apache.org/SETTINGS/1.0.0'>
-  <localRepository>mng-3955</localRepository>
+  <localRepository>target/mng-3955</localRepository>
   <offline>false</offline>
   <interactiveMode>true</interactiveMode>
 </settings>