You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2008/06/13 01:32:13 UTC

[jira] Updated: (MNG-2190) -Dkey=value parameters cannot include spaces in the value

     [ http://jira.codehaus.org/browse/MNG-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-2190:
------------------------------

    Assignee:     (was: Brett Porter)

> -Dkey=value parameters cannot include spaces in the value
> ---------------------------------------------------------
>
>                 Key: MNG-2190
>                 URL: http://jira.codehaus.org/browse/MNG-2190
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.0.2
>         Environment: Darwin
>            Reporter: Gordon Henriksen
>             Fix For: 2.0.x
>
>         Attachments: MNG-2190.patch
>
>
> 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