Problem resolving Grails plugin dependencies with Maven
I'm using Grails 1.3.7 with Idea 10.5.2 and using a pom file to declare my jar dependencies. However, my Grails plugin dependencies are declared in BuildConfig.groovy.
It looks like Idea is having trouble finding the jar dependencies of grails plugins declared in my BuildConfig.groovy file.
My application builds and starts up fine with maven, but if I try to build in Idea, I get a few compilation errors in the generated groovy stubs for both the ui-performance plugin and the tomcat plugin:
/Users/me/Library/Caches/IntelliJIdea10/compiler/proj.e144a23b/.generated/groovyStubs/e144a23b/MyProj-grailsPlugins/production/com/studentsonly/grails/plugins/uiperformance/JsErrorReporter.java
Cannot find class org.mozilla.javascript.EvaluatorException (which should be in yuicompressor.jar, a dependency of the ui-performance plugin)
/Users/me/Library/Caches/IntelliJIdea10/compiler/proj.e144a23b/.generated/groovyStubs/e144a23b/MyProj-grailsPlugins/production/org/grails/tomcat/TomcatLoader.java
Cannot find class org.apache.catalina.LifecycleListener (should be in tomcat-core.jar, a dependency of the tomcat plugin).
Here's an excerpt from my BuildConfig.groovy:
grails.project.dependency.resolution = {
pom true
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
mavenLocal()
mavenCentral()
}
plugins {
runtime(
':hibernate:1.3.7',
':spring-security-core:1.2.4',
':tomcat:1.3.7',
':ui-performance:1.2.2')
}
dependencies {
}
}
Has anyone run into this issue before?
Please sign in to leave a comment.
The jars in question live in the lib directory of their respective plugins, so in this case:
MyProj/plugins/tomcat-1.3.7/lib
and
MyProj/plugins/ui-performance-1.2.2/lib