1.ant环境变量配置如下
打开终端,输入vi ~/.bash_profile
export ANT_HOME=/Users/administrator/Documents/software/apache-ant-1.10.1
export PATH=${PATH}:${ANT_HOME}/bin
保存并退出::wq!
2.查看配置是否生效
终端输入ant -version
MacBook-Pro:~ administrator$ ant -version
Apache Ant(TM) version 1.9.6 compiled on June 29 2015
3.注意点
如果输入ant -version,提示Permission denied,则更改权限即可,chmod 755 ant