执行Ant任务时的问题 [英] Problem when executing Ant task
本文介绍了执行Ant任务时的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经安装Apache Ant和设置正确路径,CLASS_PATH和ANT_PATH变量。当我运行我的项目文件夹中的命令行中的 JAR 的任务所在的build.xml文件是,我得到以下错误:
I have installed Apache Ant and set the correctly the Path, CLASS_PATH and ANT_PATH variables. When I run a jar task in a command line within my project folder where the build.xml file is, I get the following error:
BUILD FAILED
C:\Documents and Settings\TonyS\My Documents\My Workspace\code\build.xml: 32:
The following error occurred while executing this line:
jar:file:/C:/Documents%20and%20Settings/TonyS/My%20Documents/Ant/apache-ant-1.8.1/lib/ant.jar!org/apache/tools/ant/antlib.xml:37: Could not create task or type: componentdef.
Ant could not find the task or a class this task relies upon.
....
可以请别人给我一个帮助,因为这是推动我疯了...
Can please someone give me a help as this is driving me crazy...
谢谢!
推荐答案
我有这个错误,并发现它是由在类路径中的ant.jar的旧版本引起的。
I had this error and found it was caused by having an older version of ant.jar in the classpath.
这篇关于执行Ant任务时的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文