Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.2 final
-
Fix Version/s: 1.2.1
-
Component/s: Configuration
-
Labels:None
Description
Take the following extract of BuildConfig.groovy where I want to somehow externalize the version of CXF:
cxfVersion = '2.2.4'
dependencies {
compile "org.apache.cxf:cxf-rt-core:${cxfVersion}"
}
If you do a "grails clean" you'll see an exception like:
WARNING: There was an error loading the BuildConfig: No signature of method: org.codehaus.groovy.grails.resolve.IvyDependencyManager.compile() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [org.apache.cxf:cxf-rt-core:2.2.4]
groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.grails.resolve.IvyDependencyManager.compile() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [org.apache.cxf:cxf-rt-core:2.2.4]
The workaround is to use toString() like this:
compile "org.apache.cxf:cxf-rt-core:${cxfVersion}".toString()
However that solution is not very elegant ![]()
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
duplicates
GRAILS-5776GRAILS-5776