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

Jerome Lacoste updated MEXEC-11:
--------------------------------

    Fix Version/s:     (was: before-1.1)
                   1.1-beta-1

> Allow arguments to be passed in a unified way to both mojos
> -----------------------------------------------------------
>
>                 Key: MEXEC-11
>                 URL: http://jira.codehaus.org/browse/MEXEC-11
>             Project: Maven 2.x Exec Plugin
>          Issue Type: Improvement
>    Affects Versions: 1.0.2
>         Environment: Windows XP SP2/Sun Java 1.5.09
>            Reporter: Philippe Jacot
>            Assignee: Jerome Lacoste
>            Priority: Critical
>             Fix For: 1.1-beta-1
>
>         Attachments: 
> patch_exec-maven-plugin_cmdline-args-handling-improved.patch, 
> patch_exec-maven-plugin_cmdline-args-handling-improved_v2.patch
>
>
> The attached patch enhances the exec plugin to pass arguments via a system 
> property to the exec and java mojo. When called with -Dexec.args=ARGUMENTS 
> the argument string split into single parameters which are then passed to 
> either the java or the exec mojo. Arguments can contain any number of 
> arguments separated by spaces. The following characters are treated in a 
> special way:
> ' ' (space) separates the different arguments
> i.e. -Dexec.args="There are 4 args" passes 4 arguments to the invoked program
> ' " ' (double quote) is used to to pass an argument that contains spaces
> i.e. -Dexec.args="\"A single argument\"" passes a single argument
> ' \ ' (backslash) is used to escape special characters.
> i.e. -Dexec.args="A\ single\ argument" passes a single argument
> When passing arguments through the commandline a user has to take care how 
> his commandline escapes characters.
> Due to the way maven parses its arguments it is currently not possible to 
> escape a double quote at the end of a word when usings mavens CLI, as maven 
> assumes for a double quote followed by a space, that the current argument 
> ends.
> As an example
> -Dexec.args="\"A single argument\" anotherone" will lead to an error (maven 
> complains about anotherone" not being a proper lifecycle phase
> -Dexec.args="\"A single argume\"nt anotherone" works and leads to two 
> arguments ("A single argument" and "anotherone")
> I hope this helps
> Cheers
> Philippe Jacot
> http://el4j.sf.net

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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to