ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: Batch script with arguments
Date Mon, 05 Jul 2004 09:20:06 GMT
Hello, Gian
yes it is possible. However, I do not remember now how
the user is prompt for input via a bat file. Instead,
I can recommend you to use ant task <input> [1]:

<input message="Please enter the sources dir"
<echo message="Source dir is ${project.src.dir}"/>

This will prompt you for an input in your console.
What you enter will be kept in the property named
project.src.dir and if you enter nothing, the value of
this property will be the defaultvalue ${basedir}/src.

HTH Ivan

P.S. I have some resistance against <input> task (BUT
it works perferctly), since it requires human
intervention, which immediately spoils the automation.
Something more, a project sources' directory changes
almost never. Why do you needed to dynamically load


--- Gian Franco Casula
<> wrote:
> Hi,
> I am writing a batch script that sets some
> environment
> variables and then runs ant.
> I would like to allow the user to specify an
> argument to
> the script (e.g. a directory name). The value of the
> argument
> should then be used by Ant as a property.
> More precisely, the argument is the location of my
> source
> classes that Ant should compile.
> Is this possible?
> Thanks in advance,
> Gian Franco Casula

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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

View raw message