Search

Dark theme | Light theme

October 2, 2009

Running Multiple Versions of Groovy or Grails

I use Cygwin on my Windows system to run Groovy and Grails applications. I have several versions of both Groovy and Grails on my system. Sometimes I need to run for example an application with Groovy version 1.6.4 or 1.6.5, or a Grails application with version 1.1 or 1.1.1. I set up aliases for all versions I want to run in my ~/.bashrc so I can pick the Groovy or Grails version I need without much effort.

alias groovy164='/usr/java/groovy/groovy-1.6.4/bin/groovy'
alias groovyConsole164='/usr/java/groovy/groovy-1.6.4/bin/groovyConsole'

alias groovy165='/usr/java/groovy/groovy-1.6.5/bin/groovy'
alias groovyConsole165='/usr/java/groovy/groovy-1.6.5/bin/groovyConsole'

alias groovy17beta1='/usr/java/groovy/groovy-1.7-beta-1/bin/groovy'
alias groovyConsole17beta1='/usr/java/groovy/groovy-1.7-beta-1/bin/groovyConsole'


alias grails111='/usr/java/grails/grails-1.1.1/bin/grails'
alias grails11='/usr/java/grails/grails-1.1/bin/grails'
$ groovy164 --version
Groovy Version: 1.6.4 JVM: 1.6.0_14

$ groovy165 --version
Groovy Version: 1.6.5 JVM: 1.6.0_14

$ groovy17beta1 --version
Groovy Version: 1.7-beta-1 JVM: 1.6.0_14