I need to upgrade my grails application from 2.4.4 to 3.3.6. is there any smart way to do it or any kind of help if you can share your experience.
Asked
Active
Viewed 1,490 times
1 Answers
1
Always follow the official upgrade guides.
There are upgrade guides from 2.x -> 3.2 and then from 3.2 -> 3.3
- 2.x -> 3.2: http://docs.grails.org/3.2.x/guide/upgrading.html#upgrading2x
- 3.2 -> 3.3: http://docs.grails.org/3.3.0/guide/upgrading.html
So you need to perform upgrade in 2 separate steps.

Tuomas Valtonen
- 488
- 4
- 13
-
thanks for your help I have gone through it and just willing to know any alternative – shrikant joshi Jul 25 '18 at 09:57
-
then there is the brute-force method which can be good if your application is simple. Create new grails 3.3 project and copy paste the 2.x code over, edit until you get no errors. I would not suggest this even for projects with medium complexity. – Tuomas Valtonen Jul 25 '18 at 10:00
-
oh ok, my project is too much complex and it has multiple groovy files, models, and views. can you still suggest any other options? – shrikant joshi Jul 25 '18 at 10:09
-
no shortcut here, 2 -> 3 is a massive change, there is whole new build system, 0% compatibility with plugins just to start with, new version of gorm, groovy and spring. It all comes down to how much your old project relies on these things that are under a change. I remember upgrading a codebase with around 100k lines of code from 1.3 to 2.5 and it took couple weeks to get it running, then couple weeks after the upgrade i still found things broken but they were relatively easy to fix. 1.3 to 2.5 is similar to 2 -> 3 but for example Controller code mostly worked just with copy paste. It depends. – Tuomas Valtonen Jul 25 '18 at 10:23