4 Upgrading from Grails 2.3 - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith
4 Upgrading from Grails 2.3The
upgradecommand has been removed from Grails 2.4. The procedure for upgrading to the latest version of Grails will be detailed in the user guide from now on. Below are steps that must be taken to upgrade an application from 2.3.x to 2.4.
The set-grails-version CommandThe set-grails-version command should be run to update the application's metadata to indicate which version of Grails the application is built with.
The resources PluginAs of Grails 2.4 the
resourcesplugin has been replaced with the
asset-pipelineplugin as the default resource management plugin for newly created applications. See the static resource abstraction section of the User Guide for more details. When upgrading an application to Grails 2.4 if you choose to continue using the resources plugin you will need to use version 1.2.7 or later as previous versions of the plugin are not compatible with Grails 2.4.
Static Holder ClassesThe deprecated
org.codehaus.groovy.grails.commons.ConfigurationHolderclasses have been removed from Grails 2.4.
If your application uses the jquery plugin you will need to update to version 22.214.171.124 or later as previous versions of the plugin made use of the
ApplicationHolderclass. If your application uses the resources plugin you will need to update to version 1.2.7 or later as previous versions of the plugin made use of the
We need to add some notes or provide a link to a blog post on how to address code which used to use these classes.
Changes To applicationContex.xmlThe
web-app/WEB-INF/applicationContext.xmlfile contains a bean definition for a
grailsResourceLoaderbean which is an instance of
org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean. That bean definition needs to be removed from the file. The
grailsApplicationbean may have the
grailsResourceLoaderbean injected into it as shown below.
<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean"> <description>Grails application factory bean</description> <property name="grailsDescriptor" value="/WEB-INF/grails.xml" /> <property name="grailsResourceLoader" ref="grailsResourceLoader" /> </bean>
grailsApplicationbean definition should be left in the file but the
grailsResourceLoaderbean reference should be removed as shown below.
<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean"> <description>Grails application factory bean</description> <property name="grailsDescriptor" value="/WEB-INF/grails.xml" /> </bean>
More TBD Before 2.4 Final Is Released