well, it actually *is* listed in antcontrib.properties, but on a comment line.
{{{
# Tasks Requiring Ant 1.6 or higher
#for=net.sf.antcontrib.logic.For
math=net.sf.antcontrib.math.MathTask
}}}
you might want to alter the jar...
or include all of the task definitions in your own resource file: if you already have one it's hardly any extra work.
and, about your question, I'm also asking!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-04-13
I modified the jar. Adding:
for=net.sf.antcontrib.logic.ForTask
to the Logic tasks section did the trick.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since 1.0b3 is still the "current" version, I would really urge those involved to put a note about using the xml file on the home page (http://ant-contrib.sourceforge.net/) or the download page. I have just spent most of a day tracking this down. The warning "Could not load definitions from resource org/apache/tools/ant/antlib.xml." is very misleading.
You do a great job with this project. It would be great to help users to make it work more easily.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<echo message="for requires ant version greater than or equal to ant 1.6.0." />
<antversion property="antversion" />
<echo message="You are running antversion = ${antversion}" />
<echo>
************ Ant Contrib ************
antcontrib.dir = ${antcontrib.dir}
antcontrib.jar.filename = ${antcontrib.jar.filename}
antcontrib.jar.filename location="${antcontrib.dir}/${antcontrib.jar.filename}"
************ ************
</echo>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${antcontrib.dir}/${antcontrib.jar.filename}" />
</classpath>
</taskdef>
<taskdef name="for" classname="net.sf.antcontrib.logic.ForTask">
<classpath>
<pathelement location="${antcontrib.dir}/${antcontrib.jar.filename}" />
</classpath>
</taskdef>
<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>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cannot answer why it isn't in the antcontrib.properties, but it is in the antlib.xml. You could use that instead. It is what I ended up doing.
well, it actually *is* listed in antcontrib.properties, but on a comment line.
{{{
# Tasks Requiring Ant 1.6 or higher
#for=net.sf.antcontrib.logic.For
math=net.sf.antcontrib.math.MathTask
}}}
you might want to alter the jar...
or include all of the task definitions in your own resource file: if you already have one it's hardly any extra work.
and, about your question, I'm also asking!
I modified the jar. Adding:
for=net.sf.antcontrib.logic.ForTask
to the Logic tasks section did the trick.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Since 1.0b3 is still the "current" version, I would really urge those involved to put a note about using the xml file on the home page (http://ant-contrib.sourceforge.net/) or the download page. I have just spent most of a day tracking this down. The warning "Could not load definitions from resource org/apache/tools/ant/antlib.xml." is very misleading.
You do a great job with this project. It would be great to help users to make it work more easily.
I used the following work around....
<echo message="for requires ant version greater than or equal to ant 1.6.0." />
<antversion property="antversion" />
<echo message="You are running antversion = ${antversion}" />
<echo>
************ Ant Contrib ************
antcontrib.dir = ${antcontrib.dir}
antcontrib.jar.filename = ${antcontrib.jar.filename}
antcontrib.jar.filename location="${antcontrib.dir}/${antcontrib.jar.filename}"
************ ************
</echo>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${antcontrib.dir}/${antcontrib.jar.filename}" />
</classpath>
</taskdef>
<taskdef name="for" classname="net.sf.antcontrib.logic.ForTask">
<classpath>
<pathelement location="${antcontrib.dir}/${antcontrib.jar.filename}" />
</classpath>
</taskdef>
<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>