You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Frederic Chalons <fr...@hsoftware.com> on 2006/01/02 16:05:23 UTC
Can't use FOR Task from contrib while FOREACH works fine !?
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>/
Re: Can't use FOR Task from contrib while FOREACH works fine !?
Posted by Frederic Chalons <fr...@hsoftware.com>.
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