问题描述
我得到一个错误无法加载从资源网/ SF / antcontrib / antcontrib.properties定义。它不能被发现。当我试图Ant构建于Eclipse
。于是我下载了蚂蚁的contrib-0.6.jar,并保持它在我的 / lib下的Apache Ant
位置,但它仍然没有解决我的问题。我也通过指定我 CLASSPATH
系统变量 / lib目录
位置尝试。我怎样才能解决这个错误得到什么?
I am getting an error Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.
when I am trying to ant build on eclipse. So I downloaded ant-contrib-0.6.jar and kept it in my /lib
location of apache ant, but it still does not resolve my issue. I have also tried by specifying the /lib
location in my CLASSPATH
system variable. How can I get around this error?
推荐答案
您可以明确使用类路径元素提供完整路径蚂蚁的contrib JAR
You can provide full path to the ant-contrib JAR explicitly using "classpath" element:
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${path-to-ant-contrib}/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
这篇关于收到错误&QUOT;无法加载从资源网/ SF / antcontrib / antcontrib.properties定义。它不能被发现和QUOT。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!