ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <>
Subject RE: calling ant with parameters
Date Thu, 26 Jun 2008 18:06:30 GMT
Here is the bugzilla report from Dominique.

it answers your questions.

Shawn Castrianni

-----Original Message-----
From: Scot P. Floess []
Sent: Thursday, June 26, 2008 12:56 PM
To: Shawn Castrianni
Cc: Ant Users List
Subject: RE: calling ant with parameters

So, I am curious...

How would one deliniate the name of the target(s) vs the name of params to
hand in?

Granted the -Dname=value can be somewhat verbose...

Is this $0 $1 notation somehow more obvious?  I haven't looked at
just asking "off the cuff."

So, I tend to agree as'd be nice to hand in params...just trying
to reconcile in my mind how to express this cleanly on the command line to
differentiate between params vs target names...

On Thu, 26 Jun 2008, Shawn Castrianni wrote:

> I would love this feature too.  It would allow us an easy way to launch any java class
with application arguments by having a generic launchClass target that takes in the name of
the class to launch and any app arguments.
> Dominique Devienne developed a mechanism for this with $0, $1, etc..  properties and
submitted the source code to ANT.  It is still sitting there as a request for ANT to checkin
but no one voted on it.
> ---
> Shawn Castrianni
> -----Original Message-----
> From: Guy Catz []
> Sent: Thursday, June 26, 2008 11:56 AM
> To: Ant Users List
> Subject: calling ant with parameters
> I would like to set a parameter to a ant. Something like this from command-line -
> ANT compile debug
> ANT compile release
> or
> ANT testProducts full
> ANT testProducts debugOnly
> the target Compile will "catch" the first parameter and will act as needed.
> how can I make this to work? how can I call an ANT target with parameters?
> Thanks,
>    Guy.
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and privileged information
for the sole use of the intended recipient.  Any review, use, distribution, or disclosure
by others is strictly prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the sender by reply e-mail
and delete all copies of this message.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate
Chief Architect JavaPIM

Architect Keros

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message