For the sake of those who would like to see a set of environment variables for the setup of Liferay on a Mac OS, here you’ll find what I’m using. As experienced developers, we all know these are stored in the .profile file within the home folder (e.g. /Users/stephen_davis/.profile).
# # Set variables # ANT_HOME="/usr/share/ant/ant-1.9.0" ANT_OPT="-Xms256M -Xms512M" CATALINA_BASE="/var/lib/tomcat/tomcat-7.0.40" CATALINA_HOME="/usr/share/tomcat/tomcat-7.0.40" CATALINA_TMPDIR="/usr/share/tomcat/tomcat-7.0.40/temp" CLASSPATH=".:$(/usr/libexec/java_home)/lib:/usr/grails/grails-2.2.1/lib:/Users/stephen_davis/springsource/ggts-3.2.0.RELEASE/plugins" JAVA_HOME=$(/usr/libexec/java_home) PATH=$JAVA_HOME/bin:$PATH:$GRAILS_HOME/bin:$GROOVY_HOME/bin:/usr/local/mysql-5.5.12-osx10.6-x86_64/bin:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANT_HOME:/usr/local/bin # # Export variables # export ANDROID_SDK export ANT_HOME export CLASSPATH export GRAILS_HOME export GROOVY_HOME export JAVA_HOME export PATH # # Set the alias # alias cd_tcb="cd $CATALINA_HOME/bin" alias startup_tc="$CATALINA_HOME/bin/startup.sh" alias shutdown_tc="$CATALINA_HOME/bin/shutdown.sh" #
- The declaration of the environment and export statement can be combined in a single statement for those who prefer a more concise syntax.
- You’ll notice I create a structure where releases of software packages are within a parent folder. This helps facilitate testing and debugging.
- For example, multiple versions of Apache Ant are on my development machine (versions 1.8.4 and 1.9.0). It is easy to switch between editions merely updating the variable. I know … this is pretty based stuff and it takes more work to setup. While this is not necessary, I find it helpful.
- As of this post, I was using Spingsource’s STS GG as one of IDE’s. This won’t apply to others but I’ve kept it in for those who also need to setup an editor.
- A few alias have also been established for the convenience bringing the up / down the application server.
- There are extra directories in the PATH which won’t be relevant to you if you’re not an Groovy / Grails / android developer. Go ahead and ignore them. 🙂