Skip to content

windows paths messed on recursive maven exec #435

@hohwille

Description

@hohwille

I am using exec-maven-plugin to run another maven build from within maven.
When I run maven on Windows in git-bash with custom settings like this:

export MAVEN_ARGS="-s /d/projects/mmm/conf/.m2/settings.xml"

I get this error:

[INFO] --- exec:3.1.0:exec (Install test project) @ mmm-code-java-impl ---
...
[DEBUG] Executing command line: [C:\WINDOWS\system32\cmd.exe, /c, D:\projects\mmm\software\mvn\bin\mvn.cmd, -X, install]
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: D:\projects\mmm\software\mvn
Java version: 21, vendor: Eclipse Adoptium, runtime: D:\projects\mmm\software\java
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
...
[ERROR] Error executing Maven.
java.io.FileNotFoundException: The specified user settings file does not exist: D:\d\projects\mmm\conf\.m2\settings.xml
    at org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor.process (SettingsXmlConfigurationProcessor.java:91)
    at org.apache.maven.cli.MavenCli.configure (MavenCli.java:1084)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:279)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

I already filed an issue for maven core but no feedback for 1/2 year:
https://issues.apache.org/jira/browse/MNG-8018
In that MNG issue, I even attached a ZIP with a minimal project and script to reproduce the error.

It would be lovely to get some feedback (already error confirmation would be helpful).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions