That was a clear reply stefan, thanks.

I would like to sincerely thank Diane Holt,Don Taylor
and ofcourse Stefan for spending your valuable time in 
solving my doubt.

Thanks and Regards,
Praveen.C

----- Original Message ----- 
From: "Stefan Bodewig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 2:46 PM
Subject: Re: Passing arguments.


> Praveen C. <[EMAIL PROTECTED]> wrote:
> 
> > Can ant recognize and capture arguments
> > in the command line.
> 
> Everything that doesn't start with a "-" will be interpreted as a
> target name by Ant.  You want to pass in a property.
> 
> > For example:
> > 
> > # ant -buildfile build.xml execute a.java
> 
> ant -buildfile build.xml execute -Dfilename=a.java
> 
> and in your buildfile, wherever you wanted to say a.java or $1 or %1
> or whatever, say ${filename}.  Use
> 
> <project name="dummy" default="echoparameter" basedir=".">
>   <target name="echoparameter">
>     <echo message="Parameter is ${filename}" />
>   </target>
> </project>
> 
> as a starting point.
> 
> Stefan
> 

Reply via email to