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

Two nights ago Jack Frosch gave a great summary of the new features in Grails 2.3 at the DFW Groovy – Grails User Group. At the end of the meeting somebody asked him what version of Groovy shipped with Grails 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
groovy-all-2.1.6-javadoc.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. ;)

5 thoughts on “Which version of Groovy am I using with this Grails version?”

  1. Useful information. Lucky me I discovered your website unintentionally, and I’m surprised why this twist of fate didn’t took place in advance! I bookmarked it.

  2. They know the merchandise by the reputation of the product. You may also want to look into third party payment processors and payment gateways. The next thing you need to do is to customize these t-shirts with your company logo.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>