Upgrading an application from Grails 2.2.5 to 3.0


I have a running Grails application, started some years ago with Grails 2.0.0.RC1 and updated, version after version, to 2.2.5. After this update I worked only occasionally on it, since the project was "completed", doing only bug fixing.

Now I need to work a lot on it, so I'm planning to upgrade it to Grails 3.0 in order to use new features added in the latest releases of Grails.

This project has ~25 domain classes, ~20 controllers, a bunch of services, some custom taglibs and uses some plugins: jasper, shiro, searchable.

As a general suggestion, the documentation says that

The best approach to take when upgrading a plugin or application (and if your application is using several plugins the plugins will need upgrading first) is to create a new Grails 3.0 application of the same name and copy the source files into the correct locations in the new application.

Is this really the best approach for my case, or are there alternative ways (faster and less painful) to achieve this? Do you have already dealt with this? What you've done?


I upgraded a project from 2.2 to 2.4 and the thing would not work right until I created a new 2.4 project and copied everything over. I can't imagine success with the jump you're making using any other approach.

Just hunker down with your favorite snacks, open up a branch in your dvcs (git, mercurial, etc) and make steady progress. It won't be that bad. Your challenges will likely be configuration and missing plugins. Most artefacts such as domains and controllers will work unchanged.

Speaking of plugins, make sure all the ones you need are 3.0 compatible.