Ant is already installed on some older versions of Mac OS X, so you should run ant -version to test  to check if it is already installed before attempting to install it. For MacOS Mavericks (10.9 and perhaps later versions too), Apache Ant does not come bundled with the operating system and so must be installed manually.

You can use brew to easily install ant. Simply execute the following command in a terminal window to install brew:

$  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

It may take a while to download and install. If you already have brew installed, make sure to update it by executing below command

brew update

Once brew is installed you can use below command to install ant

brew install ant

Ant will be installed and ant command will be available  in the command in the terminal.

To test the installation, just type “ant -version” into a terminal window. You should get the following output:

Apache Ant(TM) version 1.9.4 compiled on April 29 2014

Nilanchala

A blogger, a bit of tech freak and a software developer. He is a thought leader in the fusion of design and mobile technologies. He is the author of Xamarin Mobile Application Development for Android Book (goo.gl/qUZ0XV3), DZone MVB and founder of stacktips.com.

Related Articles

Join The Discussion

Please note: We reserve the right to delete comments that contains snarky remarks, offensive or off-topic. To know more read our comments policy.