You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Gordon Henriksen (JIRA)" <ji...@codehaus.org> on 2006/04/01 04:13:44 UTC
[jira] Reopened: (MNG-2190) -Dkey=value parameters cannot include
spaces in the value
[ http://jira.codehaus.org/browse/MNG-2190?page=all ]
Gordon Henriksen reopened MNG-2190:
-----------------------------------
Reopening with patch to use "$@" rather than trying to second-guess argv.
The current status quo fails on args like '-Dfoo=my "great" new project'. This is not a valid path on Windows, so I don't think I can adapt the integration test to suit. Probably could test on a property used for some other purpose, though.
It's probably true that not all shells support "$@", but I would be very surprised if anything installed at /bin/sh doesn't. Notably, ant's wrapper script uses "$@", so if that's "portable enough," then this patch should also be.
All integration tests do pass.
> -Dkey=value parameters cannot include spaces in the value
> ---------------------------------------------------------
>
> Key: MNG-2190
> URL: http://jira.codehaus.org/browse/MNG-2190
> Project: Maven 2
> Type: Bug
> Components: Command Line
> Versions: 2.0.2
> Environment: Darwin
> Reporter: Gordon Henriksen
> Assignee: Brett Porter
>
>
> Even if I properly escape spaces in a path at the shell level, Maven seems to re-split the command parameters. For instance, on Unix, the following should all run the compile goal with a property foo="bar baz":
> $ mvn compile "-Dfoo=bar baz"
> $ mvn compile -Dfoo="bar baz"
> $ mvn compile -Dfoo=bar\ baz
> But in fact, Maven fails, complaining that "baz" is an invalid task:
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ----------------------------------------------------------------------------
> [INFO] Invalid task 'baz': 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: Wed Mar 29 15:21:01 EST 2006
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> Is this intended behavior? Seems as if Maven is unnecessarily splitting the string, when the OS already does as much.
> I was merely trying to run:
> mvn deploy:deploy-file "-Dfile=/Users/me/Desktop/Bellicose SDK/lib/Bellicose.jar" ...
> In my case, it's practical to work around by renaming the Bellicose SDK folder, but it seems as if Windows users stuck with "C:\Documents and Settings\..." might have a harder time of it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira