ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Butch Clark <butch.cl...@corp.usa.net>
Subject Re: [[antlist] passing command line argument to a task]
Date Wed, 25 Jul 2001 13:46:53 GMT
"T Master" <tmaster@iknowledgeinc.com> wrote:
> How would I pass a command line argument to a task?
> 

You can use the -D argument.  The name will be the variable name within your
Ant script, and the value will be, well, the value :)

For example:

ant -Dmydir=tst

Inside the ant script you can get the value of mydir like so:

<echo message="mydir value = ${mydir}."/>

Cheers,
Butch




____________________________________________________________________
This email message is for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by reply email and destroy
all copies of the original message.

Mime
View raw message