ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Trouble with simple for loops
Date Fri, 06 Feb 2009 06:49:34 GMT
>Thanks, that seems to work (missing a </ac:for> tho). I assume 
>that I would do the same for <foreach>?

Yes. AC has a nice pattern:
- provide a propertiesfile with tasks for Ant < 1.6
- provide a antlib.xml with tasks for Ant >= 1.6, which includes the
properties file

(If you write your own tasks, you dont need that any more, because 1.6
is 'old' ;)

>I have a dumb question, according to this page:
><for> is valid for ant 1.6 or higher... so the doc is wrong?

No, thats right.
If you want to use <for> you have to have Ant 1.6 or higher (like
current 1.7.1).
<foreach> e.g. works with older Ant versions (like 1.5).

But there are two differences
- how does the task use Ant API --> which version of Ant is required
- how is the task declared --> properties/antlib.xml


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

View raw message