Ant tool on Mac Maverick 10.9.2

Apple as usually is playing a game with developers:

$ ant clean
-bash: ant: command not found


$ xcode-select --install
xcode-select: note: install requested for command line developer tools
- Agree
- Finding Software
- Server not available 


Another way:

$ which brew
- nothing
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

$ brew install ant
==> Downloading http://www.apache.org/dyn/closer.cgi?path=ant/binaries/apache-ant-1.9.3-bin.tar.gz
Error: Failed to download resource "ant"
Couldn't determine mirror, try again later.

Trying another approach:

@ ~ $ brew install homebrew/dupes/ant
Cloning into '/usr/local/Library/Taps/homebrew-dupes'...
error: RPC failed; result=7, HTTP code = 0
fatal: The remote end hung up unexpectedly
@ ~ $ ant

-bash: ant: command not found

Another approach:
got to http://ant.apache.org/bindownload.cgi
for half a day I was getting server error, but finally in the evening I was able to download:

/usr/local/apache-ant-1.9.3-bin.zip
upzip it
$ cd /usr/local/apache-ant-1.9.3/bin
$ ./ant
Buildfile: build.xml does not exist!
WORKS!
$ edit ~/.profile

Add this to your .profile file

# ANT
export ANT_HOME=/usr/local/apache-ant-1.9.3
export PATH=${PATH}:${ANT_HOME}/bin

Save and Restart terminal 

Now ant command works from any directory.








As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles