下载地址
http://ant.apache.org/
http://ant.apache.org/bindownload.cgi
配置环境变量
ANT_HOME
D:\Program Files\apache-ant-1.9.1
PATH 加入
D:\Program Files\apache-ant-1.9.1\bin;
C:\Users\zhao>ant
Unable to locate tools.jar. Expected to find it in D:\Program Files\Java\jre6\lib\tools.jar
Buildfile: build.xml does not exist!
Build failed
设置JAVA_HOME
D:\Program Files\Java\jdk1.6.0_39
C:\Users\zhao>ant
Buildfile: build.xml does not exist!
Build failed
测试
C:\Users\zhao>ant -version
Apache Ant(TM) version 1.9.1 compiled on May 15 2013
错误列表
C:\Users\zhao>ant -buildfile build3.xml
The processing instruction must begin with the name of the target
<? xml version="1.0" encoding="UTF-8" ?>
把这句开头?和xml之间的空格去掉,改成<?xml version="1.0" encoding="UTF-8" ?>就可以了。
linux下载安装配置ant
http://happyqing.iteye.com/blog/2085087
ANT简明教程
http://www.cnblogs.com/philander/articles/1782254.html
主题:关于Ant的全面了解
http://www.iteye.com/topic/78973
ant的task列表总览:
http://ant.apache.org/manual/tasksoverview.html