How-To Guides How to Install ant in your Mac OS X

How to Install ant in your Mac OS X

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"

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
Newest Most Voted
Inline Feedbacks
View all comments
8 years ago

saved my time.. Thank you for your blog.

Tin Megali
Tin Megali
7 years ago

Hi, Just a small correction: the current link to homebrew has changed.

ruby -e “$(curl -fsSL”

Nilanchala Panigrahy
Nilanchala Panigrahy
7 years ago
Reply to  Tin Megali

Thank you.

Previous Post

How to Install Node.js Mac OS X

Next Post

How to set JAVA_HOME Environment Variable MacOS

Related Posts
By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All
Would love your thoughts, please comment.x