When attempting to use mvnmin Windows it fails to find the mvn executable.
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:453)
at java.lang.ProcessImpl.start(ProcessImpl.java:139)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 10 more
Failed to execute 'mvn', either it couldn't be found, or it isn't executable.
Investigation showed that we are missing the .cmd extension on the executable name when executing on Windows.
Proposed Solution
The MavenDriver class should be enhanced to support Windows by automatically adding the .cmd extension when running on that OS.
Background
When attempting to use mvnmin Windows it fails to find the mvn executable.
Investigation showed that we are missing the
.cmd
extension on the executable name when executing on Windows.Proposed Solution
The MavenDriver class should be enhanced to support Windows by automatically adding the
.cmd
extension when running on that OS.