slachiewicz opened a new pull request, #3575: URL: https://github.com/apache/maven-surefire/pull/3575
Starts the forked JVM with `ProcessBuilder` instead of maven-shared-utils `Commandline`, which wrapped it in `/bin/sh -c` on Unix and `cmd.exe /X /C` on Windows. The JVM is now the direct child, so the shell quoting rules never touch the classpath or `argLine` (#3128, #3046), and the PID the timeout extensions see is the JVM's without the walk from #3552. `org.apache.maven.surefire.extensions.util.Commandline` is Surefire's own class: executable, arguments (with the quote-aware `argLine` splitting copied from maven-shared-utils `translateCommandline`), environment with the existing exclusion list, working directory, and a `toString()` that quotes every item for the debug log as before. `CommandlineExecutor` throws `IOException` where it threw `CommandLineException`, and `ShutdownHookUtils` moves into `surefire-api`. The shaded maven-shared-utils keeps its `cli` package for now; nothing in Surefire's own code uses it any more. Behavior change: no shell in front of the fork on any platform. The two tests that ran the shell builtin `dir` on Windows now run `cmd.exe /c dir`. Verified: `mvn verify` on `surefire-api`, `surefire-extensions-api`, `surefire-booter` and `maven-surefire-common` → 219, 1, 175 and 891 tests pass; the whole reactor compiles (`install -DskipTests`); `surefire-its` not run, and no Windows run, which this change needs before it leaves draft. Part of #3574. -- 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]
