Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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
-
MSHARED-21
Spaces are incorrectly handled on command line
-
Due to maven-invoker issue
MSHARED-21, fixed in 2.0.9.MSHARED-21, fixed in 2.0.9.