Bug#565403: ant-contrib: doc refers to missing file antlib.xml

Ludovic Claude ludovic.claude54 at googlemail.com
Fri Jan 15 22:44:37 UTC 2010


Hello Yann,

Try this, it should work.

  <taskdef resource="/net/sf/antcontrib/antlib.xml">
     <classpath>
       <pathelement location="/usr/share/java/ant-contrib.jar"/>
     </classpath>
   </taskdef>

The documentation needs to be corrected

The ant-contrib jar is not added automatically to the Ant lib as it puts
more classes in the classpath, so risks of name clashes and version
mismatch are increased.

Ludovic

Yann Dirson a écrit :
> More info:
> 
> I tried to use antlib.xml by copying it and the jar to my project, but
> adding the suggested block below:
> 
>   <taskdef resource=".../antlib.xml">
>     <classpath>
>       <pathelement location=".../ant-contrib.jar"/>
>     </classpath>
>   </taskdef>
> 
> ... results in:
> 
> Buildfile: build.xml
>   [taskdef] Could not load definitions from resource .../antlib.xml. It
> could not be found.
> 
> This happens both with absolute and relative paths to antlib.
> 
> OTOH, I could make it work by copying the parts of its contents I'm
> interested in, eg:
> 
>   <taskdef
>      name="for"
>      classname="net.sf.antcontrib.logic.ForTask"
>      onerror="ignore">
>     <classpath>
>       <pathelement location=".../ant-contrib.jar"/>
>     </classpath>
>   </taskdef>
> 
> 
> I can't really see what I'm doing wrong, maybe I just need some sleep, but
> that could just be an inaccurate doc, or a plain ant bug.
> 
> 
> 
> 
> _______________________________________________
> pkg-java-maintainers mailing list
> pkg-java-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers
> 
> 





More information about the pkg-java-maintainers mailing list