elharo opened a new issue, #246: URL: https://github.com/apache/maven-artifact-plugin/issues/246
`JdkToolchainUtil.getJavaVersion(Toolchain)` (line 40) builds the command by string concatenation: ```java Commandline cl = new Commandline(java + " -version"); ``` `Commandline` tokenizes the string on whitespace, so a `java` binary path containing spaces (common on Windows and macOS, e.g. `/Applications/My Tools/jdk/bin/java`) is split into multiple arguments and the command fails. Additionally, `CommandLineUtils.executeCommandLine` is invoked without a timeout, so a hung JVM blocks the build indefinitely. Suggested fix: use `cl.createArg().setValue(java)` / `cl.addArgument` and bound the command execution with a timeout. -- 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]
