taskdefを使用して外部antタスクを宣言する場合、たとえばant-contribの場合、提案されるセットアップは、次のtaskdefを使用することです。
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/ant-contrib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
これは、antcontrib.propertiesがbuild.xmlファイルに対してnet / sf/antcontribにある場合に機能します。
しかし、それをlib / net / sf / antcontribに入れて、taskdefをに変更すると
<taskdef resource="lib/net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/ant-contrib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
Antはプロパティファイルを見つけることができません、それはエラーを出します
[taskdef] Could not load definitions from resource
lib/net/sf/antcontrib/antcontrib.properties. It could not be found.
antはlibディレクトリを個別に扱い、そこからtaskdefリソースをロードできないようです。