[MJAR-310] - fixed toolchain version detection when toolchain paths contain white spaces
Switched to ProcessBuilder for JDK toolchain version detection as it actually correctly handles white spaces in the executable path compared to the plexus-utils dependency.
- [x] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
@jansohn - please look at comments in JIRA https://issues.apache.org/jira/browse/MJAR-310 It can be reasonable to fix a bug in plexus-utils
@jansohn can you try my proposition of fix: #87
@jansohn - please look at comments in JIRA https://issues.apache.org/jira/browse/MJAR-310 It can be reasonable to fix a bug in plexus-utils
Makes sense but there are already three year old PRs trying to revert the extra use of cmd.exe so I'm not keen on going down that route.
I think it makes more sense to just use ProcessBuilder directly for such a simple task.
@jansohn can you try my proposition of fix: #87
I can test it on Tuesday but I doubt it will fix the problem.
@jansohn can you try my proposition of fix: #87
I can test it on Tuesday but I doubt it will fix the problem.
I stand corrected and #87 actually does solve the issue with blanks in Windows paths.
Totally unintuitive that it works by setter and not by constructor argument in my opinion. While digging into the code I also saw that it actually dismisses the shell wrapping if it detects a non-Windows OS which explains why this only occurred on Windows systems.
Personally I would not rely on such an overly complex third library for such a simple use case but feel free to merge whatever PR you prefer.
Commandline used by constructor try to parse command .... so when we have a space it is wrong parsed ...
@michael-o - next issue with parsing command line 😄
Commandlineused by constructor try to parse command .... so when we have a space it is wrong parsed ...@michael-o - next issue with parsing command line 😄
It does not surprise me. I have been telling that this is broken for years.
@jansohn thanks