since the upgrade to OSX Mountain Lion I‘ve got some problems with setting the environment variables for eclipse and maven.
My goal is to run a maven command in Ecli
From here : https://stackoverflow.com/a/10374886/325742
#!/bin/sh
#
export MAVEN_OPTS=#MAVEN_OPTS_HERE#
LAUNCHER_JAR=/Applications/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
java \
-showversion \
-XX:MaxPermSize=256m \
-Xms1024m \
-Xmx1024m \
-Xdock:icon=/Applications/eclipse/Eclipse.app/Contents/Resources/Eclipse.icns \
-XstartOnFirstThread \
-Dorg.eclipse.swt.internal.carbon.smallFonts \
-Dosgi.requiredJavaVersion=1.5 \
-jar $LAUNCHER_JAR
Then, use the steps on http://mathiasbynens.be/notes/shell-script-mac-apps, to turn the above script into an application that can be kept on the dock.