Monday 17 March 2008

Leopard's A+ scorecard with Java

In preparation for looking at groovy, grails, hadoop and hypertable , I decided to get my macbook setup to run ant, maven, junit etc. After a bit of searching and scouring the net, I found a number of tutorials, on how to get this environment running, showing how to download and install this package, and that package, set up this file and add these lines to here and there, until my head was spinning.

However its is a LOT simpler than that. Just install XCode 3.0 TOOLS, from the optional installs section of your Leopard distribution disk and it will install and setup
/usr/share/ant -> ant-1.7.0
/usr/share/maven -> maven-2.0.6
/usr/share/junit -> junit-4.1

and it will throw cvs, subversion and a multitude of other tools in for good measure. Unfortunately Xcode 3 wont run on Tiger (10.4.x), where you are stuck with Xcode 2.5, which may not setup all this goodness, but since i dont have a Tiger Machine anymore, i cant verify this.

So: to start the investigation of the java frameworks/platforms listed above, I just added the following to the end of my /etc/profile, to make sure the packages can find the installed goodies.
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home; export JAVA_HOME
ANT_HOME=/usr/share/ant; export ANT_HOME
MAVEN_HOME=/usr/share/maven; export MAVEN_HOME
JUNIT_HOME=/usr/share/junit; export JUNIT_HOME

2 comments:

Anonymous said...

Tim, I have not verified your approach but I wanted to mention this link:
http://www.digitaledgesw.com/node/31

Apparently, it is a good idea to use etc/launchd.conf if an evironment variable is really supposed to be globally available.

Jeremy Flowers said...

Just been reading Xcode installation details (V 3.2.1) that you can download for use on Snow Leopard.
And it says under the section: Changes in the XCode Directory:
ant junit and maven command line tools are now part of Mac OS X v10.5 proper, so they are no longer part of XCode developer tools. So with XCode and Snow Leopard you don't get the same tools bundled that were in Leopard. C'est la vie!