Uploaded image for project: 'Maven Wrapper'
  1. Maven Wrapper
  2. MWRAPPER-151

Maven Wrapper not handling usernames with spaces on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.2
    • None
    • None
    • None

    Description

      When Maven wrapper is run on a username with spaces on Windows, it doesn’t work and an error is produced:

       

      'C:\Users\Test' is not recognized as an internal or external command, operable program or batch file.
      Cannot start maven from wrapper 

       

       

      Reproducer:

      • Have a username with spaces is in it (e.g. Test User Name)
      • Create Maven wrapper (mvn wrapper:wrapper)
      • Run the newly created Maven wrapper (mvnw –version)

       

      I suspect this is being caused by the following pattern:

      Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"

       

      Where $MAVEN_HOME contains spaces and is not being quoted correctly.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jackpgreen Jack Green
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: