Quantcast
Channel: Jworks » intellij
Viewing all articles
Browse latest Browse all 5

Upgrading Grails 2.2.4 to 2.3.0

$
0
0

I’m currently working on a trivial Grails application, running on Grails 2.2.4. However, two days ago, Grails 2.3.0 was released, providing many new features, like testing with Spock by default, Hibernate 4, etc. However, when upgrading to 2.3.0 using

grails upgrade

I received the following error:

| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.grails.plugins:tomcat:2.3.0
- org.grails.plugins:hibernate:2.3.0

I turns out grails upgrade doesn’t fix this for you (Thanks Tim!) (and, starting from Grails 2.3.0, it’s deprecated and replaced by use-current-grails-version), and you need to fix this yourself. It turns out the fix is quite easy; just add replace your Tomcat and Hibernate dependencies by this:

plugins {
        // plugins for the build system only
        build ":tomcat:7.0.42"

        // plugins needed at runtime but not for compilation
        runtime ":hibernate:3.6.10.1" // or ":hibernate4:4.1.11.1"

        // other plugins here
    }

And it will work. Hope it’s useful, and remember to carefully read the docs, I missed it.

Update (14-10-2013): If you are wondering why debugging doesn’t work: you’ll need to start Grails with run-app --debug-fork
IntelliJ Update (1-10-2013) : IntelliJ 12.1.5 has been released, which now has support for Grails 2.3.0.
If you are using IntelliJ (12.1.5 EAP at the moment), you’ll find out that it’s not compatible with Grails 2.3.0. There’s an issue for that, which has been fixed. Applying the patches from the Youtrack issue will fix the issue and will make Grails 2.3.0 working on IntelliJ 12.1.5.

The post Upgrading Grails 2.2.4 to 2.3.0 appeared first on Jworks.


Viewing all articles
Browse latest Browse all 5

Trending Articles