From 82133b20ae61527b5e3ff1909eb9f4d95c9bf834 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Wed, 8 Jan 2025 14:39:32 +0100 Subject: [PATCH] WIP --- .../it/MavenITmng3379ParallelArtifactDownloadsTest.java | 2 +- .../maven/it/MavenITmng5387ArtifactReplacementPlugin.java | 2 +- .../org/apache/maven/it/MavenITmng7228LeakyModelTest.java | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java index 07fa1937419a..6a97b1378af7 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3379ParallelArtifactDownloadsTest.java @@ -109,7 +109,7 @@ public void testitMNG3379() throws Exception { private void assertArtifact( Verifier verifier, String gid, String aid, String ver, String cls, String ext, String sha1) throws Exception { - File file = new File(verifier.getArtifactPath(gid, aid, ver, ext, cls)); + File file = new File(verifier.getArtifactPath(gid, aid, ver, ext, cls, "maven-core-it")); assertTrue(file.isFile(), file.getAbsolutePath()); assertEquals(sha1, ItUtils.calcHash(file, "SHA-1")); } diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5387ArtifactReplacementPlugin.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5387ArtifactReplacementPlugin.java index 2be7c1774c1f..23daaaa786c7 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5387ArtifactReplacementPlugin.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5387ArtifactReplacementPlugin.java @@ -49,7 +49,7 @@ public void testArtifactReplacementExecution() throws Exception { v0.execute(); v0.verifyErrorFreeLog(); - String path = v0.getArtifactPath("org.apache.maven.its.mng5387", "mng5387-it", "0.0.1-SNAPSHOT", "txt", "c"); + String path = v0.getArtifactPath("org.apache.maven.its.mng5387", "mng5387-it", "0.0.1-SNAPSHOT", "txt", "c", null); String contents = Files.readString(new File(path).toPath()); assertTrue(contents.contains("This is the second file")); } diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7228LeakyModelTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7228LeakyModelTest.java index af1812d0578c..da6f440da69b 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7228LeakyModelTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7228LeakyModelTest.java @@ -19,8 +19,8 @@ package org.apache.maven.it; import java.io.File; +import java.nio.file.Files; -import org.apache.commons.io.FileUtils; import org.apache.maven.artifact.versioning.DefaultArtifactVersion; import org.junit.jupiter.api.Test; @@ -57,8 +57,9 @@ void testLeakyModel() throws Exception { if (getMavenVersion().compareTo(new DefaultArtifactVersion("4.0.0-alpha-7")) > 0) { classifier = "build"; } - String pom = FileUtils.readFileToString(new File( - verifier.getArtifactPath("org.apache.maven.its.mng7228", "test", "1.0.0-SNAPSHOT", "pom", classifier))); + String pom = Files.readString(new File(verifier.getArtifactPath( + "org.apache.maven.its.mng7228", "test", "1.0.0-SNAPSHOT", "pom", classifier, null)) + .toPath()); assertThat(pom, containsString("projectProperty")); assertThat(pom, not(containsString("activeProperty")));