The groovy installing instruction is not full neither in the book (gis for web developers) nor in the groovy website.
Here I found a complete one:
Check step 4 out!
http://www.nabble.com/groovy-on-mac-td8874440.html
Step 1: grab the groovy.zip file
Step 2: unzip it somewhere, in my case I put it in my home directory /Users/macgyver/groovy
Step 3: set up the two variables, which I added it into .bash_profile
the two you need to setup are JAVA_HOME and GROOVY_HOME
on OSX, the JAVA_HOME should be set to /Library/Java/Home to use the default JRE
so add the following two lines
export JAVA_HOME=/Library/Java/Home
export GROOVY_HOME=/Users/macgyver/groovy
Step 4: you also need to make sure the groovy shell scripts are at least executable by
you. so go to your GROOVY_HOME/bin
and chmod u+x all the scripts there that doens’t end with .bat or .cygwin
Step 5: add GROOVY_HOME/bin to your PATH
then either logout then logback in, or run your .bash_profile
then groove away