ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
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"
would invoke the target sometarget for each space separated token in
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).

----- Original Message -----
From: "Xiaohong Wang" <>
To: <>
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
> 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
> there any way to use built-in task? Appreciate any help.
> Thanks
> Xiao
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message