You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gordon Henriksen <go...@mac.com> on 2006/03/29 22:26:45 UTC
Spaces in -D?
Even if I properly escape spaces in a path at the shell level, Maven
seems to attempt to re-tokenize the command parameters. For instance,
on Unix, the following seems as if it should run the compile goal
with a "foo" parameter valued "bar baz":
$ mvn compile "-Dfoo=bar baz"
But in fact, it 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]
------------------------------------------------------------------------
----
This looks very much like a bug. Is this intended behavior? I was
merely trying to run
mvn deploy:deploy-file "-Dfile=[path that happened to include
spaces]" ...
— G
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Spaces in -D?
Posted by Emmanuel Venisse <em...@venisse.net>.
It's fixed in 2.0.3
http://jira.codehaus.org/browse/MNG-1415
Emmanuel
Gordon Henriksen a écrit :
> On Mar 29, 2006, at 3:40 PM, Alex Shneyderman wrote:
>
>> On 3/29/06, Gordon Henriksen <go...@mac.com> wrote:
>>
>>> Even if I properly escape spaces in a path at the shell level, Maven
>>> seems to attempt to re-tokenize the command parameters. For
>>> instance, on Unix, the following seems as if it should run the
>>> compile goal with a "foo" parameter valued "bar baz":
>>>
>>> $ mvn compile "-Dfoo=bar baz"
>>
>>
>> should not it be like this:
>>
>> mvn compile -Dfoo="bar baz"
>>
>> ?
>
>
> The two forms are equivalent.
>
> — G
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Spaces in -D?
Posted by Gordon Henriksen <go...@mac.com>.
On Mar 29, 2006, at 3:40 PM, Alex Shneyderman wrote:
> On 3/29/06, Gordon Henriksen <go...@mac.com> wrote:
>
>> Even if I properly escape spaces in a path at the shell level,
>> Maven seems to attempt to re-tokenize the command parameters. For
>> instance, on Unix, the following seems as if it should run the
>> compile goal with a "foo" parameter valued "bar baz":
>>
>> $ mvn compile "-Dfoo=bar baz"
>
> should not it be like this:
>
> mvn compile -Dfoo="bar baz"
>
> ?
The two forms are equivalent.
— G
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Spaces in -D?
Posted by Alex Shneyderman <a....@gmail.com>.
should not it be like this:
mvn compile -Dfoo="bar baz"
?
On 3/29/06, Gordon Henriksen <go...@mac.com> wrote:
> Even if I properly escape spaces in a path at the shell level, Maven
> seems to attempt to re-tokenize the command parameters. For instance,
> on Unix, the following seems as if it should run the compile goal
> with a "foo" parameter valued "bar baz":
>
> $ mvn compile "-Dfoo=bar baz"
>
> But in fact, it 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]
> ------------------------------------------------------------------------
> ----
>
> This looks very much like a bug. Is this intended behavior? I was
> merely trying to run
>
> mvn deploy:deploy-file "-Dfile=[path that happened to include
> spaces]" ...
>
> — G
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Alex.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org