Christopher Holt opened MWRAPPER-82 and commented
running "c:\project\module\mvn.cmd" from "c:\project" will fail like this:
The system cannot find the file C:\project.mvn\wrapper\maven-wrapper.properties
It should look in c:\project\module, not c:\project for the .mvn folder.
This works fine with the mvnw sh script under linux.
Under liniux, the sh script starts from "dirname $0" looking for .mvn. The cmd script starts from "%CD%". wrapping this line:
set EXEC_DIR=%CD%
with pushd/popd calls fixes the problem.
i.e:
pushd %~dp0
set EXEC_DIR=%CD%
popd
Since this script is created and added to version control for the project, the workaround is to simply fix the generated scipt.
Issue Links:
- CAMEL-21662 Camel JBang - run with Spring boot / Quarkus fails on Windows
Christopher Holt opened MWRAPPER-82 and commented
running "c:\project\module\mvn.cmd" from "c:\project" will fail like this:
The system cannot find the file C:\project.mvn\wrapper\maven-wrapper.properties
It should look in c:\project\module, not c:\project for the .mvn folder.
This works fine with the mvnw sh script under linux.
Under liniux, the sh script starts from "dirname $0" looking for .mvn. The cmd script starts from "%CD%". wrapping this line:
set EXEC_DIR=%CD%
with pushd/popd calls fixes the problem.
i.e:
pushd %~dp0
set EXEC_DIR=%CD%
popd
Since this script is created and added to version control for the project, the workaround is to simply fix the generated scipt.
Issue Links: