Thursday, February 12, 2009

Problem setting path in eclipse

It is my first time using mac osx at work. I have face a few problems when trying to setting up my project recently. I keep getting "Cannot get the revision information from the scm repository : Error!" when q4e trying to build my maven project in eclipse. It is because my pom.xml is trying to get a build number from subversion using the build number plugin and when launching eclipse in OSX, it doesn't recognize the subversion.

I google it and find other people are also facing similar problem.
http://jira.codehaus.org/browse/MOJO-936

The way to solve this is you have to create an environment.plist file in ~/.MacOSX.

<plist version="1.0">
<key>PATH</key>
<string>/System/Library/Framework/JavaVM.framework/Versions/1.5/Home/bin:/opt/local/bin:/opt/subversion/bin</string>
</plist>

This will allow the application in OSX to use this environment at launch.

Also, you can't use 1.6 in your path to launch eclipse in OSX. The SWT is compiled in 32 bits.  

http://lists.apple.com/archives/Java-dev/2007/Dec/msg00283.html