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/03/30 14:52:44 UTC

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

-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


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


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

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2190?page=all ]

Kenney Westerhof updated MNG-2190:
----------------------------------

    Fix Version/s:     (was: 2.0.5)
                   2.0.6

> -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
>         Assigned To: Brett Porter
>             Fix For: 2.0.6
>
>         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

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl closed MNG-2190.
------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 2.2.x)

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

        

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

Posted by "Gordon Henriksen (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2190?page=all ]

Gordon Henriksen updated MNG-2190:
----------------------------------

    Attachment: MNG-2190.patch

> -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
>  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


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

Posted by "Gordon Henriksen (JIRA)" <ji...@codehaus.org>.
     [ 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


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

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2190?page=all ]

John Casey updated MNG-2190:
----------------------------

    Fix Version: 2.0.5

> -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
>      Fix For: 2.0.5
>  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


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

Posted by "Heinrich Nirschl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_108054 ] 

Heinrich Nirschl commented on MNG-2190:
---------------------------------------

The approach taken in maven 2.0.7 still does not work as this example shows (with bash on Linux):

$ mvn help:effective-settings -Dfoo="ba\" bu"
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'bu': 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: Sun Sep 23 08:47:21 CEST 2007
[INFO] Final Memory: 1M/66M
[INFO] ------------------------------------------------------------------------

I think it's the responsibility of the shell wrapper to correctly pass the parameters to the java process. Workarounds in Java are just a mess.

> -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
>            Assignee: Brett Porter
>             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

        

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

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ 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

        

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

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204602#action_204602 ] 

Jason van Zyl commented on MNG-2190:
------------------------------------

The commands all work in Maven 3.x.

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

        

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

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2190?page=all ]
     
Brett Porter closed MNG-2190:
-----------------------------

     Assign To: Brett Porter
    Resolution: Duplicate

> -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