SShehab
SShehab

Reputation: 1051

grails upgrade from 2.2.0 to 2.3.4

Hi I upgraded my Grails application from 2.2.0 to Grails 2.3.4, but I'm getting this error :

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

- org.apache.tomcat.embed:tomcat-embed-core:7.0.47
- org.apache.tomcat:tomcat-catalina-ant:7.0.47
- org.apache.tomcat.embed:tomcat-embed-jasper:7.0.47

 (Use --stacktrace to see the full trace)
 Error |
 Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.grails:grails-datastore-gorm-hibernate:2.0.6.RELEASE
- junit:junit-dep:4.10

  (Use --stacktrace to see the full trace)
 Error |
 Resolve error obtaining dependencies: Failed to resolve dependencies  (Set log level to 'warn' in BuildConfig.groovy for more information):

  - org.grails:grails-datastore-gorm-hibernate:2.0.6.RELEASE

(Use --stacktrace to see the full trace)
  Error |
 Failed to resolve dependencies (Set log level to 'warn' in  BuildConfig.groovy for more information):

 - org.apache.tomcat.embed:tomcat-embed-core:7.0.47
- org.apache.tomcat:tomcat-catalina-ant:7.0.47
 - org.apache.tomcat.embed:tomcat-embed-jasper:7.0.47

Any recommendations to fix this issue ?

Upvotes: 0

Views: 3911

Answers (2)

Hernán Erasmo
Hernán Erasmo

Reputation: 371

From the Grails 2.3.4 Release Notes

If you are upgrading from previous versions of Grails 2.3.x and you use the Hibernate and/or Tomcat plugins you will need to update the versions in BuildConfig:

  • build ':tomcat:7.0.47'
  • runtime ':hibernate:3.6.10.6'

And since you are upgrading from 2.3, I think you should also read What's new in Grails 2.3?

Upvotes: 3

Emmanuel John
Emmanuel John

Reputation: 2340

Grails 2.3.4 requires you to upgrade most of your dependencies. I don't know all but I think you have to upgrade hibernate to hibernate 3. Here's what my current project's BuildConfig looks like:

dependencies {
    // specify dependencies here under either 'build', 'compile', 'runtime',    'test' or 'provided' scopes e.g.
    runtime 'mysql:mysql-connector-java:5.1.24'

    //compile 'com.paypal.sdk:merchantsdk:2.4.103'
    compile 'joda-time:joda-time:2.2'
    compile ('org.apache.poi:poi:3.9','org.apache.poi:poi-ooxml:3.9')
    compile 'com.stripe:stripe-java:1.3.0'
}

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

    // plugins for the compile step
    compile ":scaffolding:2.0.0.RC1"
    compile ':cache:1.1.1'

    // plugins needed at runtime but not for compilation
    runtime ":hibernate:3.6.10.6" // or ":hibernate4:4.1.11.M2"
    runtime ":database-migration:1.3.5"
    compile ":jquery:1.10.2"
    runtime ":resources:1.2"
    // Uncomment these (or add new ones) to enable additional resources capabilities
    //runtime ":zipped-resources:1.0.1"
    //runtime ":cached-resources:1.1"
    //runtime ":yui-minify-resources:0.1.5"

    //app plugins
    compile ':webflow:2.0.8.1'
    compile ":mail:1.0.1"
    compile ":asynchronous-mail:1.0-RC5" //1.0
    compile ":spring-security-core:1.2.7.3"
    compile ':excel-export:0.1.10'
    compile ":spring-security-core:1.2.7.3"

    test ":spock:0.7"
}

This works for me.

Upvotes: 2

Related Questions