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 0ebd2eb0c [1.9.x] Create surefire-tmp before tests use it
0ebd2eb0c is described below

commit 0ebd2eb0c2290077f14222bacceed769f705f491
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Fri Nov 20 23:01:40 2026 +0100

    [1.9.x] Create surefire-tmp before tests use it
    
    Surefire points java.io.tmpdir at ${project.build.directory}/surefire-tmp 
but never creates the directory. On JDK 8 Files.createTempDirectory resolves 
java.io.tmpdir at call time and fails with NoSuchFileException (e.g. 
FileUtilsTest with @Rule TemporaryFolder / @TempDir). On JDK 9+ the default 
temp dir is cached at JVM startup, which hid the problem. Set surefire's 
tempDir to the same name so the directory exists before tests run.
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index e942a893c..09871f939 100644
--- a/pom.xml
+++ b/pom.xml
@@ -419,6 +419,7 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
+            <tempDir>surefire-tmp</tempDir>
             <argLine>-Xmx128m</argLine>
             
<redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
             <systemPropertyVariables>

Reply via email to