[ http://jira.codehaus.org/browse/MEXEC-5?page=all ]

Dan Friedman updated MEXEC-5:
-----------------------------

    Attachment: ExecJavaMojo.patch

Patch to fix this issue. Per conversation with trygvis in #maven, I've left the 
behaviour of the arguments parameter alone, but removed the parameter 
expression for it so it can only be configured via POM. Finally, I've added a 
new parameter (args) for specification of command-line arguments (e.g. mvn 
exec:java -Dexec.mainClass=Foo -Dexec.args="bar baaz").

Documentation needs to be updated to reflect this change.

> specifying -Dexec.args on command line to exec:java plugin doesn't seem to do 
> anything
> --------------------------------------------------------------------------------------
>
>                 Key: MEXEC-5
>                 URL: http://jira.codehaus.org/browse/MEXEC-5
>             Project: Mojo Exec Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.0.4, java 1.5.06, MacOS X
>            Reporter: toli kuznets
>         Assigned To: Kaare Nilsen
>         Attachments: ExecJavaMojo.patch, mvn.out, pom.xml
>
>
> Bug 1: documentation at 
> http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html suggests that the 
> way to override arguments from command line is to use -Dexec.arguments=asdf 
> (same here as well: 
> http://mojo.codehaus.org/exec-maven-plugin/introduction.html)
> That doesn't work, and results in this error:
>  [EMAIL PROTECTED] mvn exec:java -Dexec.arguments=somearg
> > [INFO] Scanning for projects...
> > [INFO] Searching repository for plugin with prefix: 'exec'.
> > [INFO] 
> > ----------------------------------------------------------------------------
> > [INFO] Building someProject
> > [INFO]    task-segment: [exec:java]
> > [INFO] 
> > ----------------------------------------------------------------------------
> > [INFO] Preparing exec:java
> > [INFO] No goals needed for project - skipping
> > [INFO] 
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO] 
> > ------------------------------------------------------------------------
> > [INFO] Failed to configure plugin parameters for:
> > org.codehaus.mojo:exec-maven-plugin:1.0
> >
> > on the command line, specify: '-Dexec.arguments=VALUE'
> >
> > Cause: Cannot assign configuration entry 'arguments' to 'class
> > [Ljava.lang.String;' from '${exec.arguments}', which is of type class
> > java.lang.String
> It was suggested that i try -Dexec.args - that passes the command-line, but 
> doesn't do anything. the argument is not picked up.
> It's the same behaviour if i do 
> %> mvn exec:java -Dexec.noSuchArg=asdfasdf
> so that makes me think the -Dexec.args is ignored altogether and it really is 
> the -Dexec.arguments that needs to be specified.
> The -X stacktrace for running "mvn exec:java -Dexec.arguments=somevalue" is 
> attached.

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