On Thu, Apr 15, 2010 at 7:40 PM, Andy2008 <[email protected]> wrote:
>
> I did download that zip file and as I mentioned in my post, the issue is
> there's no for loop in the antcontrib.properties.
You're absolutely correct!
I can't believe it. I never used the "for" task, so never noticed it before.
There is certainly a class for it (net.sf.antcontrib.logic.forTask), but
it's not there.
I did manage to change taskdef to <taskdef
resource="net/sf/antcontrib/antlib.xml"/> and that worked. I noticed the
antlib.xml file in there, and the "for" task is defined there.
Here's my build file:
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${basedir}/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<target name="foo">
<echo message="The first five letters of the alphabet are:"/>
<for list="a,b,c,d,e" param="letter">
<sequential>
<echo>Letter @{letter}</echo>
</sequential>
</for>
</target>
</project>
--
David Weintraub
[email protected]