jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Plugin Testing
  • MPLUGINTESTING-9

BuildTool.executeMaven fails when local repository path contains spaces

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2
  • Fix Version/s: 1.3
  • Component/s: plugin-testing-tools
  • Labels:
    None
  • Environment:
    Windows XP, Cygwin

Description

BuildTool.executeMaven is trying to execute the following command:

cmd.exe /X /C ""C:\Program Files (x86)\apache-maven-2.1.0\bin\mvn.bat" -B "-Dmaven.repo.local="C:\Documents and Settings\mark\My Documents\myproject\target\test-classes\repository"""

Which fails with the following build log due to mismatched quotes:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'and': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu May 21 16:19:29 BST 2009
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------

As you can see, my Maven installation path contains spaces, as so does my local repository path. It appears that the problem is that MavenCommandLineBuilder is trying to quote the value of maven.repo.local which is confusing the already quoted -D argument.

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. MSHARED-21 Spaces are incorrectly handled on command line

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Mark Hobson added a comment - 21/May/09 10:37 AM

Due to maven-invoker issue MSHARED-21, fixed in 2.0.9.

Show
Mark Hobson added a comment - 21/May/09 10:37 AM Due to maven-invoker issue MSHARED-21, fixed in 2.0.9.
Hide
Permalink
Mark Hobson added a comment - 21/May/09 10:42 AM

Upgraded maven-invoker to 2.0.9 for fix.

Show
Mark Hobson added a comment - 21/May/09 10:42 AM Upgraded maven-invoker to 2.0.9 for fix.

People

  • Assignee:
    Mark Hobson
    Reporter:
    Mark Hobson
Vote (0)
Watch (0)

Dates

  • Created:
    21/May/09 10:26 AM
    Updated:
    21/May/09 10:42 AM
    Resolved:
    21/May/09 10:42 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.