【问题标题】:ant-contrib installation failure on linuxlinux上的ant-contrib安装失败
【发布时间】:2013-05-17 11:56:58
【问题描述】:

我想使用“ant-contrib”,但我无法使用它。我尝试使用 3 方式,但没有成功。

Apache Ant(TM) version 1.8.2

 echo $ANT_HOME
 /usr/share/ant

./usr/share/ant/lib/ant-contrib-1.0b2.jar
./usr/share/java/ant/ant-contrib-1.0b2.jar
./usr/share/java/ant.jar

*1.*
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />

RESULT:
Buildfile: /home/username/build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib           
/antcontrib.properties. It could not be found.

*2.*
<taskdef resource="net/sf/antcontrib/antlib.xml"/>

RESULT:
Buildfile: /home/username/build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml.        It     could not be found.


 *3.* build.xml in my home, and ant-contrib in home/lib
 <classpath id="contrib.classpath.ref">
            <fileset dir="${basedir}/lib"/>
    </classpath>

    <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="contrib.classpath.ref"/>

 RESULT:
 Buildfile: /home/username/build.xml:2: Problem: failed to create task or type  classpath
 Cause: The name is undefined.
 Action: Check the spelling.

我不知道其他解决方案,我可以在其中迭代文件集/自定义列表,对它们一一进行。这就是为什么它对我很重要。 老实说,为什么没有明确的文档?

【问题讨论】:

标签: ant


【解决方案1】:

问题是上面提到的YAN。我的系统中有更多的蚂蚁。

总而言之,我删除了它们,再次尝试使用全新下载的 ant 构建 xml。 什么不在 PATH 上,从它所在的目录开始。

我知道这不是最好的设置,但我可以随意尝试,解决正确的设置只是时间问题。

感谢大家付出的时间和精力。

【讨论】:

    猜你喜欢
    • 2012-01-27
    • 1970-01-01
    • 1970-01-01
    • 2021-04-24
    • 2012-03-05
    • 2016-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多