arturobernalg opened a new pull request, #13593:
URL: https://github.com/apache/maven/pull/13593

   Backport of #13239 to maven-3.10.x. It is already on master and on 
maven-4.0.x (#13248).
   
   Under Cygwin the JVM is a native Windows process and cannot resolve POSIX 
paths such as `/cygdrive/c/temp/pom.xml`, so `mvn -f /cygdrive/c/temp/pom.xml 
validate` and `mvn -s /cygdrive/c/.../settings.xml` fail (#10810, reported 
against 3.9.6). `bin/mvn` already converts its own paths with `cygpath`, but 
not the ones given as arguments. It now converts the absolute POSIX path of 
`-f/--file`, `-s/--settings`, `-gs/--global-settings`, `-t/--toolchains`, 
`-gt/--global-toolchains`, `-ps/--project-settings`, `-is/--install-settings`, 
`-it/--install-toolchains` and `-l/--log-file`, both as separate arguments and 
as `--flag=value`. MinGW and MSYS2 are not touched, and relative paths and 
Windows paths are left as they are.
   
   The patch did not apply as it was, because the launcher differs on this 
branch (the `MAVEN_ARGS` handling is different, and `-af` does not exist in 
3.x), so the block was placed after the `MAVEN_ARGS` processing and the 
`-af/--at-file` flag was left out. The test script 
`test-mvn-path-conversion.sh` has the same cases as on master: `-f`, `-s` and 
`--file=` with a `/cygdrive` path, a relative path, and MinGW. It passes, and 
the three Cygwin cases fail without the change. I could not run it on a real 
Cygwin, the script uses a `cygpath` stub, and I did not run the integration 
tests.
   
   ---
   
   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)
   - [x] 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