Sakibul Hasan
Dont be a Pithagorian, be for others
Install Apache Ant on Mac OS X
Posted by on July 30, 2010
Do the following steps to install Ant on your Mac OS X:
- Get the latest version of Apache Ant (binary distribution) from its official website (example link)
- Unzip the binary distribution and rename the folder to “ant”
- move the folder to “/usr/local”. terminal commands:
mv ant /usr/local
- create a link of that folder after going to that folder. terminal commands:
cd /usr/local
ln -s ant ant
- Open “bashrc” file located inside “/etc” and append the following lines in the end
export ANT_HOME=/usr/local/ant
export PATH=${PATH}:${ANT_HOME}/bin
- Now close current terminal and open a new one. Now if you type “ant” in the new terminal and get a message “build.xml does not exist” then you have done it!
Advertisement
there’s not file “bashrc” in my dir “etc”…
these are the files in “etc”:
ant-bootstrap.jar jdepend-frames.xsl junit-noframes.xsl tagdiff.xsl
changelog.xsl jdepend.xsl log.xsl
checkstyle junit-frames-xalan1.xsl maudit-frames.xsl
coverage-frames.xsl junit-frames.xsl mmetrics-frames.xsl
thank you..
bashrc is a hidden file. The name of the file should be ‘.bashrc’. open a command promt, go to the specified directory and type “ls -a”. You will see the file named “.bashrc”.
hello,
Thanks a lot bro…. this utorial helped me alot…. i was able to get in one shot ….
nice job
you are welcome Harpreet
Thanks for this tip. I’m a newbie mac developer and I was able to install ant in one go using your tip.
Thank you so much!!! Helped a lot
I tried to do it, but it says
mv: rename ant to /usr/local: Permission denied
Something with chmod?
I solved it buy just put the ant map with my documents and go to my documents map in the terminal.
export ANT_HOME=ant
export PATH=${PATH}:${ANT_HOME}/bin
Thank you So much it’s so simple
Thanks buddy that easy and fast to do
Ant is already installed on your Mac. You just have to set ANT_HOME to point to /usr/share/ant
Thanks for the info Kevin. I will give it a try though donno when as I switched to maven