虽然myeclipse集成了ant,但是它并没有集成ivy。在eclipse中,help->eclipse marketplace选择ivy,安装以后,运行ivy:retrieve,报错
failed to create task or type antlib:org.apache.ivy.ant:retrieve
所以还是决定自己安装ant和ivy。
在http://apache.fayea.com//ant/binaries/apache-ant-1.9.7-bin.zip,下载ant, apache-ant-1.9.7-bin.zip
在http://mirror.bit.edu.cn/apache//ant/ivy/2.4.0/apache-ivy-2.4.0-bin.zip,下载ivy,apache-ivy-2.4.0-bin.zip
1、安装ant
将apache-ant-1.9.7-bin.zip解压在E:\program
配置环境变量
ANT_HOME E:\program\apache-ant-1.9.7
Path E:\program\apache-ant-1.9.7\bin
Classpath E:\program\apache-ant-1.9.7\lib
在cmd中运行 ant,输出如下,表示安装成功
Buildfile: build.xml does not exist!
Build failed
2、安装ivy
解压apache-ivy-2.4.0-bin.zip,将ivy-2.4.0.jar放到ant_home的lib下
已经集成到ant了
3、集成到eclipse
windows->preferences 选择ant home entries,点击ant home,选择ant的安装路径即可