You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tobias Oberlies (JIRA)" <ji...@apache.org> on 2015/05/13 14:10:59 UTC

[jira] [Created] (MNG-5823) mvnDebug doesn't work with M2_HOME with spaces - missing quotes

Tobias Oberlies created MNG-5823:
------------------------------------

             Summary: mvnDebug doesn't work with M2_HOME with spaces - missing quotes
                 Key: MNG-5823
                 URL: https://issues.apache.org/jira/browse/MNG-5823
             Project: Maven
          Issue Type: Bug
    Affects Versions: 3.3.1
         Environment: Windows, Cygwin
            Reporter: Tobias Oberlies


When calling {{mvnDebug}} in a Cygwin shell, I get the following error

{noformat}
Preparing to Execute Maven in Debug Mode
dirname: extra operand `Files/Maven/apache-maven-3.3.1/bin/mvnDebug'
Try `dirname --help' for more information.
env: /mvn: No such file or directory
{noformat}

The root cause are missing quotes in and around the dirname call. The script currently calls
{noformat}
env MAVEN_OPTS="$MAVEN_OPTS $MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"
{noformat}
but the call should be 
{noformat}
env MAVEN_OPTS="$MAVEN_OPTS $MAVEN_DEBUG_OPTS" "$(dirname "$0")/mvn" "$@"
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)