This post is a collection of resources and links for those looking for more details on updating a previous version of Grails to the grails 2.x stream.
Where to start?
Programmin Grails by Burt Beckwith – This book contains the definitive guide on updating from a previous version of Grails to the latest one.
It describes in great detail how to go ahead with an update in chapter 12 – Upgrading Applications and Plugins.
Also useful is the section at the end of the chapter, where it describes all the changes made across sections of Grails. It puts together the information within the release notes in a concise and browsable way, which is very useful when you encounter issues in upgrading to Grails.
Understanding upgrade changes
The grails user guide has a good chapter on upgrading from previous versions of Grails - http://grails.org/doc/latest/guide/upgradingFromPreviousVersionsOfGrails.html
There is a howto created on things to watch out on when moving from a pre-2.x version to 2.x. - http://pledbrook.github.com/grails-howtos/en/upgradeToGrails2.html
The SpringSource blog also has a good series called countdown to grails 2.0:
- User Experience: http://blog.springsource.org/2011/12/14/countdown-to-grails-2-0-user-experience/
- Persistence: http://blog.springsource.org/2011/12/05/countdown-to-grails-2-0-persistence/
- Database Migrations: http://blog.springsource.org/2011/08/17/countdown-to-grails-2-0-database-migrations/
- Static Resources: http://blog.springsource.org/2011/06/30/countdown-to-grails-2-0-static-resources/
- Unit Testing: http://blog.springsource.org/2011/06/07/countdown-to-grails-1-4-unit-testing/
Other people’s experiences
Finally, it’s worth reading these blog posts for actual experiences encountered by other developers during the upgrade process.
- Rob Fletcher on upgrading our app at BSKYB – http://blog.freeside.co/grails-2-upgrade-part-1/
- Ted Naleid on grails 2.0 unit testing – http://naleid.com/blog/2012/05/01/upgrading-to-grails-2-unit-testing/
- Joe Sondow’s blog on upgrading Asgard to grails 2 - http://joesondow.blogspot.co.uk/2012/02/ye-olde-tragic-journey-of-attempting-to.html
Watch for bugs
In our upgrade, we did run into a few fairly strange issues, so it’s always worth checking the Grails JIRA.
Here is a samples of the type of issues I ran into during our upgrade process:
- GPDATABASEMIGRATION-109 – Migrations on Grails 2.2.0.RC2 fail when doing a liquibase update:data
- GRAILS-9699 – Running test-app via grails tA doesn’t set the environment to test
- GRAILS-9739- delete() does not work in withNewSession
- GRAILS-9614 – Actions in src/templates/scaffolding/Controller.groovy don’t call overriden actions
- GRAILS-9150 – latest.release in plugin does not work in 2.1 RC2 against main grails repo