Which version of Groovy am I using with this Grails version?

Two nights ago [Jack Frosch](http://www.linkedin.com/in/jackfrosch) gave a great summary of the new features in Grails 2.3 at the [DFW Groovy – Grails User Group](http://www.dfw2gug.org/index.html#december2013). At the end of the meeting somebody asked him what version of [Groovy](http://groovy.codehaus.org/) shipped with [Grails](http://grails.org/) 2.3. I could tell by the look on his face he wasn’t sure, so I came to the rescue.

Considering nobody else in the room could answer the question, I figured I would blog my answer. For starters, you have two easy options to get the version of Groovy used in your Grails distribution.

You can simply look at the Grails installation on your workstation. One of the benefits of Grails is that it ships with everything you need to build your webapp, including Groovy. Just drill down into the lib dir and look at the jar file.

Fri Dec 06 13:43 eweibust@RSNPLALT538 ~/dev/hello
$ ls $GRAILS_HOME/lib/org.codehaus.groovy/groovy-all/jars
groovy-all-2.1.6.jar groovy-all-2.1.6-sources.jar

You can also get the version programatically with the following call:
println “groovy version: ” + GroovySystem.getVersion()
Which prints:
groovy version: 2.1.6
Hey, Google, you should go ahead and crawl this one. Should be useful to others. 😉

This Post Has 3 Comments

  1. Bill Fly

    Application Status
    App version: 0.1
    Grails version: 2.3.4
    Groovy version: 2.1.9
    JVM version: 1.7.0_45

  2. Bill Fly

    Where is the presentation and code examples from Jack’s presentation?

  3. erikweibust


    Jack hasn’t submitted to me to post to the website. I’ll ask him today.


Leave a Reply