You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Remo Liechti <re...@swisslog.com> on 2005/10/27 11:20:33 UTC

How to call an ant script with parameters?

Hi all
I didnt find an answer to this in the documentaion or in the mailinglist
archive:

To run a ant script, I have to call it like this:

Ant -buildfile MyAntScript.xml MyTarget

I call my ant script using batch files on windows. Now I need to set
some parameters to the ant script dynamicly, like:

Ant -buildfile MyAntScript.xml MyTarget MyParameter1 MyParameter2

And so on. How do I access such parameters inside of MyAntScript.xml? Is
it possible?
Cause of ant's syntax, MyParameter1 and 2 would be another target... :/

Remo

____________________________________________________________
This message may contain legally privileged or confidential 
information and is therefore addressed to the named persons only. 
The recipient should inform the sender and delete this message, 
if he/she is not named as addressee. 
The sender disclaims any and all liability for the integrity 
and punctuality of this message. 
The sender has activated an automatic virus scanning by 
Messagelabs, but does not guarantee the virus free 
transmission of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org