slachiewicz opened a new pull request, #2339:
URL: https://github.com/apache/maven-resolver/pull/2339

   Fix the JDK 8 test failure seen in `maven-resolver-util` (`FileUtilsTest` 
errors with `NoSuchFileException` on `target/surefire-tmp/junit-...`).
   
   The root POM sets Surefire's `java.io.tmpdir` to 
`${project.build.directory}/surefire-tmp`, but never creates that directory. On 
JDK 8, `Files.createTempDirectory` resolves `java.io.tmpdir` when called and 
fails; on JDK 9+ the default temp dir is captured at JVM startup, so the 
missing directory went unnoticed. This affects the JUnit 4 `@Rule 
TemporaryFolder` on the 1.9.x base as well as the JUnit 5 `@TempDir` used by PR 
#2338 — it is not introduced by that migration.
   
   Setting Surefire's `tempDir` to the same name makes Surefire create the 
directory before tests run, with no change to where test temp files live.
   
   Verified locally:
   - unmodified 1.9.x base (`00164f1`) + this fix: `mvn -B -q clean test` green 
on JDK 8 (1069 test cases) and JDK 21.
   - PR #2338 head + this fix: green on JDK 8 (1068 test cases) and JDK 21.
   - Without the fix, both trees fail on JDK 8 in `FileUtilsTest`.
   
   This is independent of #2338 and can be merged before or after it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to