我已经安装了Apache Ant并正确设置了Path,CLASS_PATH和ANT_PATH变量。当我在那里的build.xml文件是我的项目文件夹中运行一个命令行罐子任务,我得到以下错误:执行Ant任务时出现问题
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.
....
可以请别人给我的帮助,因为这是推动我疯了...
谢谢!
Componentdef.class和Jar.class在ant.jar本身中。你的ant.jar是否损坏 - 大小是1.4Mb左右? – JoseK 2010-10-12 08:14:56
我假设你谈论的是PATH(不是'Path'),'CLASSPATH'(而不是'CLASS_PATH')和'ANT_HOME'(而不是'ANT_PATH')*环境变量*? – zb226 2017-04-11 11:52:53
我不记得了,那已经快7年了。 – Anto 2017-04-11 12:43:40