The best place to store environment variables on OS X is /etc/launchd.conf. The contents of that file are accessible by console applications, and also (unlike ~/.bashrc and the like) by desktop applications.
Paths should be defined in /etc/paths.
In /etc/launchd.conf:
setenv JAVA_HOME /Library/Java/Home
setenv GRAILS_HOME /Developer/grails-1.2.1
In /etc/paths:
/Developer/grails-1.2.1/bin