ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: array in ant
Date Mon, 02 Jun 2003 19:49:58 GMT
In ant-contrib, there is a <foreach/> task.

It is able to parse a string into tokens separated by a delimiter chosen by
the build file writer.
<foreach list="${FooName}" delimiter=" " target="sometarget"
param="fooelement"/>
would invoke the target sometarget for each space separated token in
${FooName},
passing the token to sometarget as ${fooelement}.

I guess this is what you would like to do.

Concerning arrays, I do not know if there are addon tasks for ant which
support them.

Ant-contrib has variable support (sorts of properties which are mutable).

Cheers
Antoine
----- Original Message -----
From: "Xiaohong Wang" <xwang@esri.com>
To: <user@ant.apache.org>
Sent: Monday, June 02, 2003 7:04 PM
Subject: array in ant


> hello,
>
> I need to create an array in ant build process. I was using <input
> message="Enter Foo Name:" addproperty="FooName" /> to get the Foo Name and
> loop through it to try to get the list of Foo Name. However in ant,
> properties are immutable, so it can't be changed once it first time be
set.
> So what I get is always the first time  input value.  I try not to write
> custom task here. Is this something that has to be done in custom task or
is
> there any way to use built-in task? Appreciate any help.
>
> Thanks
> Xiao
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>



Mime
View raw message