ant 进行编译时发生如下错误信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
G:\test\ant\hello-ivy>ant Buildfile: G:\test\ant\hello-ivy\build.xml resolve: BUILD FAILED G:\test\ant\hello-ivy\build.xml:38: Problem: failed to create task or type antli b:org.apache.ivy.ant:retrieve Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. 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: -D:\ant\bin\..\lib -C:\Users\Michael\.ant\lib -a directory added on the command line with the -lib argument Total time: 0 seconds |
原因:ant的lib目录下缺少ivy相关的jar
解决办法:把ivy的jar包(ivy-2.3.0-rc1.jar) 复制到%ANT_HOME%\lib\下即可。
原创文章,转载请注明: 转载自micmiu – 软件开发+生活点滴[ http://www.micmiu.com/ ]
本文链接地址: http://www.micmiu.com/exception/ivy-failed-to-create-task-or-type/
0 条评论。