You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2026/07/24 16:42:57 UTC

[I] Backport #7958 (MNG-7205) to the 3.x line: convert paths for MinGW in `bin/mvn` [maven]

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: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Backport #7958 (MNG-7205) to the 3.x line: convert paths for MinGW in `bin/mvn` [maven]

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #12537:
URL: https://github.com/apache/maven/issues/12537#issuecomment-5127296651

   @gnodet, thanks!


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Backport #7958 (MNG-7205) to the 3.x line: convert paths for MinGW in `bin/mvn` [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #12537: Backport #7958 (MNG-7205) to the 3.x line: convert paths for MinGW in `bin/mvn`
URL: https://github.com/apache/maven/issues/12537


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org