--- Pravin Pillai <[EMAIL PROTECTED]> wrote:
> Is there any way I can pass command-line arguments to ant.
> 
> Let me explain my problem:
> 
> My directory structure is
> 
> 
>              |---Dir_1
>              |
> Base_Dir-----|---Dir_2
>              |
>              |---Dir_3
> 
> I have my build.xml in the Base_Dir from where i wud be running ant.
> 
> Now I wish to do something like 
> 
> ant deploy Dir_1
> 
> ant deploy Dir_2
> 
> which means i wud like to specify the directory as a command-line
> argument.
> 
> Is this possible. Can someone give me examples.

Assuming you have a generic "deploy" target that uses a property (eg.,
${dir}) to specify which directory, then you can define the value on the
command-line using -D<property_name>=<value>. Eg:

  $ ant -Ddir=Dir_1 deploy

Just curious -- was this not clear from the documentation?

Diane

=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to