slachiewicz opened a new pull request, #82: URL: https://github.com/apache/maven-executor/pull/82
Fixes #78. `jvmSystemProperties` now reach forked Maven as `-Dkey=value` command-line arguments, ahead of the request arguments, instead of through `MAVEN_OPTS`, which the Maven 3 `mvn` script splits on whitespace. `-Duser.home` and `jvmArguments` stay in `MAVEN_OPTS`; a `user.home` containing whitespace is quoted, which the Maven 4 script and `mvn.cmd` honor. Changes in behavior worth reviewing: - In forked mode these properties are now also Maven user properties (`session.getUserProperties()`), as `-D` on the command line always makes them; in embedded mode they stay system properties only. - Maven 4 does not override a key the JVM already has (`java.io.tmpdir`, `file.encoding`) from a command-line `-D`; such keys belong in `jvmArguments`. - With Maven 3 on Unix, a `user.home` or a `jvmArguments` token containing whitespace still breaks, because the script word-splits `MAVEN_OPTS`. I have not run this on Windows; `userHomeWithSpaces4` is the test that checks the quoting there. --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [ ] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
