收到错误“无法从资源 net/sf/antcontrib/antcontrib.properties 加载定义.找不到." [英] Getting an error "Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found."

查看:27
本文介绍了收到错误“无法从资源 net/sf/antcontrib/antcontrib.properties 加载定义.找不到."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一个错误 无法从资源 net/sf/antcontrib/antcontrib.properties 加载定义.找不到它. 当我试图在 Eclipse 上构建 ant 时.所以我下载了 ant-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?

推荐答案

您可以使用classpath"元素显式提供 ant-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>

这篇关于收到错误“无法从资源 net/sf/antcontrib/antcontrib.properties 加载定义.找不到."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆