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?
Grails 3.0 is a complete ground up rewrite of Grails so, as also official documentation says, the best approach is to create a new application and then copy inside it sources file first (src/java, src/groovy, grails-app) and static assets to asset folder. Next you have to migrate the configuration (e.g. configuration in Config.groovy should be now in application.yml or application.groovy) and dependency files (BuildConfig.groovy to build.gradle).
The entire process is well described at official link you provide. Finally, as Emmanuel Rosa said above make sure the plugins you are using are all Grails 3.x compatible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With