Search code examples
grails

Upgrading from Grails 2.2 to 4.0: Is there a cross-reference between old org.codehaus to new grails classes?


We are upgrading an application from Grails 2.2.0 to Grails 4. Obviously the biggest step is Grails 2 to Grails 3, which requires a lot of code changes.

Several pages in the Grails documentation (e.g. http://docs.grails.org/3.1.7/guide/upgrading.html) state:

All package declaration in sources should be modified for the new location of the respective classes. Example org.codehaus.groovy.grails.commons.GrailsApplication is now grails.core.GrailsApplication.

We have a large set of codehaus classes. This comment sounds like the (old) codehaus classes have been moved to multiple packages (presumably all grails.?).

Is there a cross-reference, listing which grails package each codehaus class has been moved to?

NOTE: After doing most work without taking notes, these are x-references for some I did note, if that helps.

| From                                                                     | To                                                                 |
|--------------------------------------------------------------------------+--------------------------------------------------------------------+
| org.codehaus.groovy.grails.orm.hibernate.HibernateSession                | org.grails.orm.hibernate.HibernateSession                          |
| org.codehaus.groovy.grails.web.json.JSONObject                           | org.grails.web.json.JSONObject                                     |
| org.codehaus.groovy.grails.commons.GrailsDomainClass                     | grails.core.GrailsDomainClass                                      |
| org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser             | grails.plugin.springsecurity.userdetails.GrailsUser                |
| org.codehaus.groovy.grails.web.json.JSONArray                            | org.grails.web.json.JSONArray                                      |
| org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService | grails.plugin.springsecurity.userdetails.GormUserDetailsService    |
| org.springframework.security.core.authority.GrantedAuthorityImpl         | org.springframework.security.core.authority.SimpleGrantedAuthority |

Solution

  • Is there a cross-reference, listing which grails package each codehaus class has been moved to?

    There is not. In part because it is not the case that each grails package has a codehaus counterpart, and vice versa.