Pither.com / Simon
Development, systems administration, parenting and business

Grails 1.2.0 (or 1.2.1 snapshot) upgrade

Following the recent release of Grails 1.2.0 I've attempted to upgrade a few of the projects I work on. Some of these attempts have gone better than others.

For one of the simpler ones I only hit two problems.

  1. Combining Acegi with Enum's defined in the same source file as domain objects no longer works. The grails bug is here and thankfully the workaround is easy - just pull all the Enum's into their own files.

  2. Due to some of the performance improvements that Grails 1.2 makes around it's handling of GSPs and Sitemesh, the addProperty() function no longer works correctly

Unfortunately the second problem was not so easy to work around. It does however have a fix committed to the 1.2.x branch of development code. So how do you get that then? Here's what I did:

$ git clone git://github.com/grails/grails.git grails
$ cd grails
$ git checkout origin/1.2.x

You'll get some warnings about not being on a branch, but assuming you just want to build it and not modify it, you can safely ignore them.

$ ant package

You'll obviously need ant and a suitable java compiler ready to go before running this last step.

After a couple of minutes you should have a dist/grails-1.2.1.SNAPSHOT.zip file which you can unzip/install in just the same way you would a download from the grails site.

Only thing left after that is to "grails upgrade" your project again to set it to the 1.2.1.SNAPSHOT version!

Add a comment