Friday, September 2, 2016

How to Install Ant in OS X

Ant Installation

Download Apache Ant from its website: http://ant.apache.org/bindownload.cgi

Copy the archive file to /opt directory and extract it:

cd Downloads
cp apache-ant-1.9.7-bin.tar.gz /opt
cd /opt
tar -xvf apache-ant-1.9.7-bin.tar.gz

Set ANT_HOME and PATH Environment Variables

$ nano ~/.bash_profile
(~/.bash_profile)

# Ant Home for Mac User
export ANT_HOME=/opt/apache-ant-1.9.7

# Export to PATH
export PATH=$PATH:$ANT_HOME/bin

Find out where the Ant executable files is using the which command:

$ which ant
/opt/apache-ant-1.9.7/bin/ant
$ 

You can check Ant installation by issuing the command:

$ ant -version
Apache Ant(TM) version 1.9.7 compiled on April 9 2016

No comments :

Post a Comment