ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gian Franco Casula" <gian.franco.cas...@topficie.nl>
Subject Re: Batch script with arguments
Date Mon, 05 Jul 2004 09:28:51 GMT
Thanks Ivan and Antoine!


>Why do you needed to dynamically load it?

The batch file will be located on a server
from where different users can acces it. Each
user might have his/her sources locally on
different paths. By asking for the path I'm
trying to overcome these differences.

Thanks again,

Gian Franco

----- Original Message -----
From: "Ivan Ivanov" <rambiusparkisanius@yahoo.com>
To: "Ant Users List" <user@ant.apache.org>; "Gian Franco Casula"
<gian.franco.casula@topficie.nl>
Sent: Monday, July 05, 2004 11:20 AM
Subject: Re: Batch script with arguments


> 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"
>     addproperty="project.src.dir"
>     defaultvalue="${basedir}/src"/>
> <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
> it?
>
> [1]http://ant.apache.org/manual/CoreTasks/input.html
>
> --- Gian Franco Casula
> <gian.franco.casula@topficie.nl> 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
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


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


Mime
View raw message