ppkarwasz opened a new issue, #12537:
URL: https://github.com/apache/maven/issues/12537
## Description
The `bin/mvn` script of the 3.x line converts `MAVEN_PROJECTBASEDIR` to
Windows format only for Cygwin:
```sh
# For Cygwin, switch project base directory path to Windows format before
# executing Maven otherwise this will cause Maven not to consider it.
if $cygwin ; then
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
```
Under MinGW (e.g., Git Bash, used by `shell: bash` steps on GitHub Actions
Windows runners) the POSIX path falls through to `exec java
"-Dmaven.multiModuleProjectDirectory=/d/a/..."`, where the [MSYS2 argument
conversion](https://www.msys2.org/docs/filesystem-paths/) rewrites it to the
mixed form `D:/a/...` with forward slashes.
While `/` and `\` are equivalent for the Win32 API, the mixed form breaks
some applications and plugins. Passing the canonical representation of Windows
paths to the JVM would prevent this class of problem.
The `main` branch already handles MinGW like Cygwin since #7958 (merged via
#520, released in 4.0.0-alpha-2); this is safe because MSYS2 ships `cygpath`.
Please consider backporting that change to the 3.x line.
## Context
Currently due to a bug in Apache RAT `0.17`-`0.18` (fixed by
[RAT-559](https://issues.apache.org/jira/browse/RAT-559), not yet released), we
can not use `${maven.multiModuleProjectDirectory}/.rat-excludes` as the
location of the exclusion file. The bug is of course in Apache RAT, but since
Maven 4.x already handles MinGW and Cygwin alike, backporting the patch would
work around the problem.
--
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]