eclipse - 收到错误 “Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.”

标签 eclipse ant ant-contrib

当我尝试在eclipse上构建ant时,出现Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.错误。因此,我下载了ant-contrib-0.6.jar并将其保存在apache ant的/lib位置,但是仍然无法解决我的问题。我还尝试通过在/lib系统变量中指定CLASSPATH位置来进行尝试。如何解决这个错误?

最佳答案

您可以使用“classpath”元素显式提供指向ant-contrib JAR的完整路径:

<taskdef resource="net/sf/antcontrib/antlib.xml">
  <classpath>
    <pathelement location="${path-to-ant-contrib}/ant-contrib-1.0b3.jar"/>
  </classpath>
</taskdef>

关于eclipse - 收到错误 “Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15304845/

相关文章:

eclipse - 如何将 e4 eclipse 部件添加到“显示 View ”对话框中

android - Eclipse Android 2.2项目报错但是Android 4.0没有报错

java - WizardNewFileCreationPage - 是否可以添加新元素

java - 寻找 Java 项目的层次结构标准

maven - 在maven-antrun-plugin中调用foreach

c++ - Eclipse CDT 的额外重构

Javadoc 创建失败并出现 IllegalArgumentExpection

java - ThreeTen toZonedDateTime : Exceptions when built by Ant

ant - 如何在ant脚本中调用ant.exe路径

Ant <chdir> 任务?