From a previous post I did:
| Here are my postmortems of two of the upgrades I've done:
|
https://dev.to/virtualdogbert/grails-2-5-5-to-grails-3-3-10-postmortem-520a
|
https://dev.to/virtualdogbert/grails-3-3-10-to-4-0-2-postmortem-5kj
|
|Gives you an idea of what's involved and as I've said before the pain in upgrading is the number of bad practices you have * the size of your
| project. Upgrading from 2 to 3 forces you to abandon a lot of bad practices, so once you get to upgrading to 4 it's easier just by the nature
| of getting rid of those bad practices.
In my opinion, I would go straight to 5.3.3, getting past 3.x is the biggest leap, but everything below 5.x is EOL.
I view plugins that aren't maintained by the Grails teams as just good starting points for integrations and you may have to take them over an maintain them yourself one day. A lot of build plugins were shifted to Gradle plugins.
For testing controllers, I've gone to API integration tests using Rest Assured combined with Spring RestDocs. Example app:
https://github.com/groovyduke/rest-docs/tree/g5
What I've usually done to upgrade is similar to the above, but for the big upgrade, I would create an example app of my target version and port over the code, using finds and replaces to fix as much as I could. In my current job, they had a conversion script using sed and awk. although that was about 1 million lines of Groovy Grails code spread across several apps and took years to upgrade successfully from 2.5 to 4 and then I did the upgrade to 5 in a couple months, most of which was trying to get QA to test it. Also, look up the Upgrade guides and change the version in the URL to get the older versions back to 2.x