hohwille opened a new issue, #11487:
URL: https://github.com/apache/maven/issues/11487

   ### Affected version
   
   4.0.0-rc-5
   
   ### Bug description
   
   Updating to Maven4 breaks my usage scenario:
   ```
   $ echo $MAVEN_ARGS
   -s D:\projects\mmm\conf\mvn\settings.xml 
-Dsettings.security=D:\projects\mmm\conf\mvn\settings-security.xml
   $ mvn -v
   [ERROR] Error executing Maven.
   [ERROR] The specified user settings file does not exist: 
D:\projects\mmm\projectsmmmconfmvnsettings.xml
   ```
   
   To me it looks as if maven4 does some transformation with backslashes in 
path's.
   Maybe also the wrapper script calling maven via Java is causing this effect.
   If diffed the `mvn` wrapper script and found that in 3.9.9 it was containing 
this relevant block that was removed in maven 4.0:
   ```
   # For MinGW, ensure paths are in Unix format before anything is touched
   if $mingw ; then
     [ -n "$MAVEN_HOME" ] &&
       MAVEN_HOME=`(cd "$MAVEN_HOME"; pwd)`
     [ -n "$JAVA_HOME" ] &&
       JAVA_HOME=`(cd "$JAVA_HOME"; pwd)`
     # TODO classpath?
   fi
   ```
   
   When I downgrade to maven 3.x it works again:
   ```
   $ mvn -v
   WARNING: A restricted method in java.lang.System has been called
   WARNING: java.lang.System::load has been called by 
org.fusesource.jansi.internal.JansiLoader in an unnamed module 
(file:/D:/projects/mmm/software/mvn/lib/jansi-2.4.1.jar)
   WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for 
callers in this module
   WARNING: Restricted methods will be blocked in a future release unless 
native access is enabled
   
   Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
   Maven home: D:\projects\mmm\software\mvn
   Java version: 25, vendor: Eclipse Adoptium, runtime: 
D:\projects\mmm\software\java
   Default locale: en_US, platform encoding: UTF-8
   OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
   ```


-- 
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