Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5804

mvn.bat does not work in root directory on Windows

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.3.1
    • Fix Version/s: None
    • Component/s: Command Line
    • Labels:
    • Environment:
      Win7 x64 german

      Description

      On Windows the new `mvn.cmd` script does not work if the current working directory is the root dir of a drive. In that case it will initialize `%MAVEN_PROJECTBASEDIR%` with a trailing `\` and that will break the java command line as it escapes the following quote of `"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%"`.

      It works on 3.2.1 and fails with 3.3.1:

      c:\> cd /d C:\
      c:\>c:\devenv\apache-maven-3.2.1\bin\mvn --version
      Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
      Maven home: c:\devenv\apache-maven-3.2.1\bin\..
      ...
      c:\>c:\devenv\apache-maven-3.3.1\bin\mvn --version
      Usage: java [-options] class [args...]
      ...
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rfscholte Robert Scholte
                Reporter:
                b.eckenfels Bernd Eckenfels
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: