sorry to belabor the point, but I think I'm still not quite getting it: >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 I can't use <for> but only <ac:for>, right? I understand that the difference is just the namespace. But, based on the example given in the doc page (basically the thing I had problems with) I didn't need the namespace at all. so, how would I get it to work like that (on 1.6 or higher)? btw, I should have mentioned my ant version: 1.7.1 Thanks, Steve On 2/6/09, [email protected] <[email protected]> wrote: > > >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: > >http://ant-contrib.sourceforge.net/tasks/tasks/for.html > ><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 > > > Jan > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
