cd ~/
(Get the current versions of Ant and Ivy)
curl -O http://apache.hoxt.com/ant/binaries/apache-ant-1.7.1-bin.zip
curl -O http://opensource.become.com/apache/ant/ivy/2.0.0-rc2/apache-ivy-2.0.0-rc2-bin.zip
unzip apache-ant-1.7.1-bin.zip
unzip apache-ivy-2.0.0-rc2-bin.zip
sudo mv apache-ant-1.7.1 /usr/local/ant
(or copy the folder to /usr/local and create a symlink to ant)
(For the sake of simplicity, I'm just copying the ivy jar into Ant's lib folder):
sudo cp apache-ivy-2.0.0-rc2/ivy-2.0.0-rc2.jar /usr/local/ant/lib/
(Set the home for the current session - this should be added to bashrc in order for it to work permanently)
export ANT_HOME=/usr/local/ant
Test with:
ant -version
(You should see something like)
Apache Ant version 1.7.1 compiled on June 27 2008
If so, you can go into one of the ivy example folders:
cd apache-ivy-2.0.0-rc2/src/example/hello-ivy
ant
If this has worked, you should see:
run:
[java] standard message : hello ivy !
[java] capitalized by org.apache.commons.lang.WordUtils : Hello Ivy !
BUILD SUCCESSFUL
If you want to use ivy in Eclipse, all you should need to do is make sure the jar is in the buildpath.
I found this guide pretty useful for installing Ant in OS X:
http://www.asceticmonk.com/blog/?p=388
0 comments:
Post a Comment