Search code examples
grailsgrails-plugingrails-2.0

Grails 2.0 plugin dependencies


I'm trying to build a Grails 2.0 application using private plugins:

  • mycompany-frontend = Grails Application
  • mycompany-core = Grails plugins for domain classes

In the mycompany-core plugin, I created some domain classe and added a joda-time dependency in BuildConfig.groovy:

plugins {
    build(":tomcat:$grailsVersion",
          ":release:1.0.1",
          ":svn:1.0.2") {
        export = false
    }
    build(":joda-time:1.3.1")
}

in the mycompany-frontend app, I have the following BuildConfig.groovy:

plugins {
    runtime ":hibernate:$grailsVersion"
    runtime ":resources:1.1.5"
    build "mycompany:mycompany-core:0.1-SNAPSHOT"

build ":svn:1.0.2"
build ":spring-security-core:1.2.7"
    build ":tomcat:$grailsVersion"
}

I also removed grails.plugins entries from application.properties to avoid confusion. But at the end, the mycompany-frontend cannot find the model classes from mycompany-core plugin.

What should I look/fix to get this working?


Solution

  • Have you tried to define the dependency to your core-plugin as runtime-/compile-dependency instead of build?