sharanggupta opened a new pull request, #273:
URL: https://github.com/apache/maven-artifact-plugin/pull/273

   `JdkToolchainUtil` built its command from `java + " -version"`, which 
`Commandline` splits on whitespace. With a JDK under a path such as `C:\Program 
Files\Java`, the command failed, and `mvn.toolchain.jdk` in the `.buildinfo` 
file recorded the error instead of the JDK version. The java path is now the 
executable and `-version` a separate argument, as the issue suggests.
   
   `java -version` also had no timeout, so a JDK that hangs blocked the build. 
It now gets 30 seconds. On a timeout the error is recorded like the other 
failures handled there.
   
   Two tests use fake `java` scripts: one in a directory whose name contains 
spaces, and one that never exits. They are disabled on Windows because the 
fakes are shell scripts. `mvn verify` passes; I did not run the `run-its` 
profile.
   
   Closes #246
   
   ---
   
   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:
   
   - [x] 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)
   - [ ] 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]

Reply via email to