You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Trevor Harmon <tr...@vocaro.com> on 2008/10/03 15:28:13 UTC

exec:java arguments vs. commandLineArgs

In the exec:java goal, what is the difference between <arguments> and  
<commandLineArgs>? The documentation says:

arguments: The class arguments
commandlineArgs: Arguments for the executed program

The difference still isn't clear to me.

Trevor


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: exec:java arguments vs. commandLineArgs

Posted by Simone Gianni <si...@apache.org>.
Hi Trevor,
documentation lacks a lot of explanations, but looking at the code it
seems like :
- If commandLineArgs is specified, it will be used as is, except for
replacing %classpath with proper classpath using dependencies
- Otherwise if the property exec.args is specified, it will be used
- Otherwise the list of <argument> and <classpath> will be parsed and used

So, yes, they both (and the exec.args also) serve the same purpose, but
commandLineArgs is taken more or less literaly, as well as exec.args,
while the <arguments> element offer a more "formal" way of specifying
parameters and calculating classpaths.

Hope this helps,
Simone

Trevor Harmon wrote:
> In the exec:java goal, what is the difference between <arguments> and
> <commandLineArgs>? The documentation says:
>
> arguments: The class arguments
> commandlineArgs: Arguments for the executed program
>
> The difference still isn't clear to me.
>
> Trevor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


-- 
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
MALE human being programming a computer   http://www.simonegianni.it/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org