Cover by Burt Beckwith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Chapter 12. Upgrading Applications and Plugins

New Grails versions are released fairly often, and they always contain bug fixes and new features that you probably want to have available in your applications and plugins. You might not be able to upgrade for every release, but you shouldn’t get too far out of date. We try our best to limit breaking changes and other changes that will make upgrading harder, but sometimes progress has its costs.

Grails does have an upgrade script, but it doesn’t do all of the work needed to upgrade between versions, and will likely be removed or at least renamed in a future version of Grails, because the name is a bit misleading. It is useful in some respects, but there will always be manual steps involved in upgrading to a newer version of Grails.

So what does the upgrade script do? There are a few fixes for very old (pre-1.0) applications:

  • Delete basedir/plugins/core (core taglibs are now part of Grails, not files in the application)
  • Move basedir/grails-tests test classes to test/integration
  • Delete basedir/tmp
  • Move basedir/spring and basedir/hibernate under basedir/grails-app/conf

and there are fixes for all versions:

  • Copy current static resources (images, CSS, JS) to basedir/web-app
  • Replace basedir/web-app/WEB-INF/sitemesh.xml and basedir/web-app/WEB-INF/applicationContext.xml with the latest versions
  • Copy current *.tld files to basedir/web-app/WEB-INF/tld
  • Create missing grails-app/conf files (Config.groovy, BuildConfig.groovy, DataSource.groovy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required