Do you need to install or update Groovy? Try java InstallGroovy groovy-binary-1.5.0.zip, this is a simple java program to download, unzip and link a Groovy binary release package into your /opt local system. The source code is also attached.
Also see SetupGroovyLib Auto setup and download dependencies jars