Reputation: 35961
I'm trying to build an Grails plugin on top of Resources Plugin. Basically it's just a ResourceMapper. So, I need to use MapperPhase
enum.
I've tried to add following into BuildConfig.groovy
:
plugins {
build(":tomcat:$grailsVersion",
":release:2.0.3",
":rest-client-builder:1.0.2") {
export = false
}
runtime(":resources:1.1.6")
}
tried also compile(":resources:1.1.6"), but same result
As I see, it's pretty standard practice for resources based plugins, and should works. Btw, when I'm trying to run main application, it fails with:
| Error Compilation error: startup failed:
***/XXXResourceMapper.groovy: 5: unable to resolve class org.grails.plugin.resource.mapper.MapperPhase
@ line 5, column 1.
import org.grails.plugin.resource.mapper.MapperPhase
And also, I'm using Intellij IDEA, and it can't resolve this enum as well.
How I should specify dependency to Resources Plugin at this case?
PS In main Grails application, that uses this plugin, i'm using local plugins definition (like grails.plugin.location.'XXX-resources' = 'XXX'
). If it's matter.
Upvotes: 3
Views: 1807
Reputation: 60
I found my self with the exact same error. However this in my case it was caused by the gwt plugin (version 0.8).
In my case I solved it migrating ALL my plugin references from the applicaiton.properties into the BuildConfig.groovy script. Like so:
From application.properties
plugins.cloud-foundry=1.2.2
plugins.cloud-support=1.0.11
plugins.hibernate=2.1.1
plugins.jquery=1.7.2
plugins.mail=1.0
plugins.message-digest=1.1
plugins.navigation=1.3.2
plugins.recaptcha=0.5.2
plugins.spock=0.6
plugins.spring-mobile=0.4
plugins.spring-security-core=1.2.7.3
plugins.spring-security-openid=1.0.4
plugins.svn=1.0.0.M1
plugins.tomcat=2.1.1
To BuildConfig.groovy
plugins {
build ":tomcat:$grailsVersion"
compile ":gwt:0.8"
compile name:'spring-mobile', version:'0.4'
compile ":cloud-foundry:1.2.3"
compile ":spring-security-core:1.2.7.3"
compile ":spring-security-openid:1.0.4"
compile ":cloud-support:1.0.11"
compile ":hibernate:2.1.1"
compile ":mail:1.0.1"
compile ":message-digest:1.1"
compile ":navigation:1.3.2"
compile ":recaptcha:0.5.2"
compile ":spring-mobile:0.4"
compile ":svn:1.0.0.M1"
runtime ":database-migration:1.2"
runtime ":jquery:1.7.2"
test ":spock:0.6"
}
Hope this help you as well!
Upvotes: 3