这是为了在Eclipse中作为Ant构建来运行文件。我已经设置了Ant,现在需要安装Maven Ant任务。我按照Maven网站上的说明进行操作:下载JAR并将其放入我的.ant/lib中,然后再次检查我的环境变量是否正确。然而,当我尝试在Eclipse中作为Ant构建运行时,它给出了这个错误:
No types or tasks have been defined in this namespace yet
This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-C:\Users\arempel\Documents\eclipse\eclipse\plugins\org.apache.ant_1.8.3.v201301120609\lib
-C:\Users\arempel\.ant\lib
-a directory added on the command line with the -lib argument现在我知道有一大堆像这样的问题已经得到了解决,但我已经尝试了所有我能找到的解决方案,但都没有用。我已经尝试在prompt中使用-lib,尝试设置classpath变量,尝试使用我的环境变量,但不知何故,我仍然搞砸了。
有没有人知道我做错了什么,错过了什么?
发布于 2013-06-22 04:21:13
在Eclipse中运行Ant时,管理Ant类路径的是Eclipse本身。
查看Eclipse的全局首选项,然后查看Ant/Runtime面板。第一个选项卡“Classpath”是您要修改的选项卡。点击“Global Entries”,然后点击“Add jars...”按钮。选择Maven Ant任务的jar,就完成了。
https://stackoverflow.com/questions/17242431
复制相似问题