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

mvnDebug doesn't work with M2_HOME with spaces - missing quotes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.5.0-alpha-1, 3.5.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows, Cygwin

      Description

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

      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
      

      The root cause are missing quotes in and around the dirname call. The script currently calls

      env MAVEN_OPTS="$MAVEN_OPTS $MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"
      

      but the call should be

      env MAVEN_OPTS="$MAVEN_OPTS $MAVEN_DEBUG_OPTS" "$(dirname "$0")/mvn" "$@"
      

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in maven-3.x #1179 (See https://builds.apache.org/job/maven-3.x/1179/)
          MNG-5823 mvnDebug doesn't work with M2_HOME with spaces - missing (schulte: rev c188a195562695454a244cb2a9b374d22d1812d5)

          • apache-maven/src/bin/mvnDebug
            MNG-5823 mvnDebug doesn't work with M2_HOME with spaces - missing (schulte: rev ab7b5ab4703a05a8b0923c2e336e7165d9c2180d)
          • apache-maven/src/bin/mvnyjp
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in maven-3.x #1179 (See https://builds.apache.org/job/maven-3.x/1179/ ) MNG-5823 mvnDebug doesn't work with M2_HOME with spaces - missing (schulte: rev c188a195562695454a244cb2a9b374d22d1812d5) apache-maven/src/bin/mvnDebug MNG-5823 mvnDebug doesn't work with M2_HOME with spaces - missing (schulte: rev ab7b5ab4703a05a8b0923c2e336e7165d9c2180d) apache-maven/src/bin/mvnyjp
          Hide
          stephenc Stephen Connolly added a comment -

          Maven 3.4.0 has been dropped. See this thread for more details.

          This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.

          Show
          stephenc Stephen Connolly added a comment - Maven 3.4.0 has been dropped. See this thread for more details. This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.
          Hide
          michael-o Michael Osipov added a comment -
          Show
          michael-o Michael Osipov added a comment - Fixed with 46c1581474ed3b8110dbc7275172b92056b6e5dd .
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-3.x #1527 (See https://builds.apache.org/job/maven-3.x/1527/)
          MNG-5823 mvnDebug doesn't work with M2_HOME with spaces - missing (michaelo: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=46c1581474ed3b8110dbc7275172b92056b6e5dd)

          • (edit) apache-maven/src/bin/mvnDebug
          • (edit) apache-maven/src/bin/mvnyjp
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-3.x #1527 (See https://builds.apache.org/job/maven-3.x/1527/ ) MNG-5823 mvnDebug doesn't work with M2_HOME with spaces - missing (michaelo: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=46c1581474ed3b8110dbc7275172b92056b6e5dd ) (edit) apache-maven/src/bin/mvnDebug (edit) apache-maven/src/bin/mvnyjp

            People

            • Assignee:
              michael-o Michael Osipov
              Reporter:
              tobias.oberlies Tobias Oberlies
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development