ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Chalons <frederic.chal...@hsoftware.com>
Subject Re: Can't use FOR Task from contrib while FOREACH works fine !?
Date Mon, 02 Jan 2006 16:20:14 GMT
Hi,

Sorry, I forget to precise that I was using the beta version 1.0b2.
Actually, it is working fine with the version 0.6 .

Regards,
Frederic

Frederic Chalons wrote:

> Hi,
>
> I would like to use "for task" from the contrib (currently under Windows)
> I quite confused since I am able to invoked the foreach task (target 
> "run-each") with no problem.
> However the target "run" fails and is a copy/paste of the first exampe 
> at:
>    http://ant-contrib.sourceforge.net/tasks/tasks/for.html
> I get the following reply:
> /    could not create task of type of type: for/
>
> Do I need to perform any further configuration beside setting the PATH 
> and defining the resource task?
>
> Thanks,
> Fred
>
> Ant File used:
>
>    /<project default="run">/
>    /    <property environment="env" />/
>    /    <taskdef resource="net/sf/antcontrib/antcontrib.properties">/
>    /        <classpath>/
>    /            <pathelement
>    location="${env.ANTCONTRIB_HOME}/lib/ant-contrib.jar" />/
>    /        </classpath>/
>    /    </taskdef>/
>    /    /
>    /    <target name="run">/
>    /        <for list="a,b,c,d,e" param="letter">/
>    /            <sequential>/
>    /                <echo>Letter @{letter}</echo>/
>    /            </sequential>/
>    /        </for>/
>    /    </target>/
>    /    /
>    /    <target name="run-each">/
>    /        <foreach list="a,b,c,d,e" param="letter" target="print"/>/
>    /        </target>/
>    /    <target name="print">/
>    /        <echo>${letter}</echo>/
>    /    </target>/
>    /</project>/
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message