ant下载地址:http://ant.apache.org/
现在最新版本:1.9.1
- 下载并解压到相应目录下,为了以后运行方便可以设置ant_home环境变量
- 运行ant -version测试ant是否正常
- ant运行任务需要依赖一些jar包,apache并没有把所有依赖的jar包放在ant下载文件中,但只需要运行一条命令这些jar文件就会自动下载:ant -f fetch.xml -Ddest=system,Ddest参数决定下载的目录,system表示下载到ant_home/lib文件夹下,具体说明如下:
ant -f fetch.xml -Ddest=[option]
where option is one of the following, as described above:
system
- store in Ant's lib directory (Recommended)user
- store in the user's home directoryoptional
- store in Ant's source code lib/optional directory, used if building Ant source code