This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch maven-resolver-1.9.x
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git
The following commit(s) were added to refs/heads/maven-resolver-1.9.x by this
push:
new 34d2486e6 [1.9.x] Drop redundant Surefire temp-dir workarounds
34d2486e6 is described below
commit 34d2486e6877a71654715937939645e5bbc3d9f5
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Nov 21 01:55:33 2026 +0100
[1.9.x] Drop redundant Surefire temp-dir workarounds
Now that Surefire creates target/surefire-tmp (#2339), the local mkdirs()
calls in tests are no longer needed. Point Failsafe's java.io.tmpdir at target/
itself: setting a failsafe-tmp subdirectory was not created reliably on Windows
JDK 8 and broke the Hazelcast ITs.
---
.../resolution/TrustedChecksumsArtifactResolverPostProcessorTest.java | 2 --
.../internal/impl/synccontext/NamedLockFactoryAdapterTestSupport.java | 2 --
.../aether/named/hazelcast/NamedLockFactoryAdapterTestSupport.java | 2 --
pom.xml | 2 +-
4 files changed, 1 insertion(+), 7 deletions(-)
diff --git
a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/resolution/TrustedChecksumsArtifactResolverPostProcessorTest.java
b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/resolution/TrustedChecksumsArtifactResolverPostProcessorTest.java
index b2b0ea6af..b8d5d4d54 100644
---
a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/resolution/TrustedChecksumsArtifactResolverPostProcessorTest.java
+++
b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/resolution/TrustedChecksumsArtifactResolverPostProcessorTest.java
@@ -21,7 +21,6 @@ package org.eclipse.aether.internal.impl.resolution;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
-import java.nio.file.Paths;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -72,7 +71,6 @@ public class
TrustedChecksumsArtifactResolverPostProcessorTest implements Truste
@BeforeEach
public void prepareSubject() throws IOException {
-
Files.createDirectories(Paths.get(System.getProperty("java.io.tmpdir"))); //
hack for Surefire
// make the two artifacts, BOTH as resolved
File tmp = Files.createTempFile("artifact", "tmp").toFile();
artifactWithoutTrustedChecksum = new
DefaultArtifact("test:test:1.0").setFile(tmp);
diff --git
a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/NamedLockFactoryAdapterTestSupport.java
b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/NamedLockFactoryAdapterTestSupport.java
index 6fb66a081..925f6b8f7 100644
---
a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/NamedLockFactoryAdapterTestSupport.java
+++
b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/NamedLockFactoryAdapterTestSupport.java
@@ -20,7 +20,6 @@ package org.eclipse.aether.internal.impl.synccontext;
import java.io.IOException;
import java.nio.file.Files;
-import java.nio.file.Paths;
import java.util.Arrays;
import java.util.HashMap;
import java.util.concurrent.CountDownLatch;
@@ -84,7 +83,6 @@ public abstract class NamedLockFactoryAdapterTestSupport {
@BeforeEach
public void before() throws IOException {
-
Files.createDirectories(Paths.get(System.getProperty("java.io.tmpdir"))); //
hack for Surefire
LocalRepository localRepository =
new
LocalRepository(Files.createTempDirectory("test").toFile());
session = mock(RepositorySystemSession.class);
diff --git
a/maven-resolver-named-locks-hazelcast/src/test/java/org/eclipse/aether/named/hazelcast/NamedLockFactoryAdapterTestSupport.java
b/maven-resolver-named-locks-hazelcast/src/test/java/org/eclipse/aether/named/hazelcast/NamedLockFactoryAdapterTestSupport.java
index 1e96a7544..bbe5c9208 100644
---
a/maven-resolver-named-locks-hazelcast/src/test/java/org/eclipse/aether/named/hazelcast/NamedLockFactoryAdapterTestSupport.java
+++
b/maven-resolver-named-locks-hazelcast/src/test/java/org/eclipse/aether/named/hazelcast/NamedLockFactoryAdapterTestSupport.java
@@ -20,7 +20,6 @@ package org.eclipse.aether.named.hazelcast;
import java.io.IOException;
import java.nio.file.Files;
-import java.nio.file.Paths;
import java.util.Arrays;
import java.util.HashMap;
import java.util.concurrent.CountDownLatch;
@@ -77,7 +76,6 @@ public abstract class NamedLockFactoryAdapterTestSupport {
@BeforeEach
public void before() throws IOException {
-
Files.createDirectories(Paths.get(System.getProperty("java.io.tmpdir"))); //
hack for Surefire
LocalRepository localRepository =
new
LocalRepository(Files.createTempDirectory("test").toFile());
session = mock(RepositorySystemSession.class);
diff --git a/pom.xml b/pom.xml
index ab47fa9c9..c92527282 100644
--- a/pom.xml
+++ b/pom.xml
@@ -417,7 +417,7 @@
<argLine>-Xmx128m</argLine>
<redirectTestOutputToFile>${failsafe.redirectTestOutputToFile}</redirectTestOutputToFile>
<systemPropertyVariables>
-
<java.io.tmpdir>${project.build.directory}/failsafe-tmp</java.io.tmpdir>
+ <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
</systemPropertyVariables>
</configuration>
<executions>