Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0-M2
-
Fix Version/s: None
-
Component/s: Build System
Description
Adding an inPlacePlugin without removing ivy-managed plugin from BuildConfig.groovy and then running/compiling the application BEFORE you add the inPlacePlugin line causes a confusing error message:
grails run-app
| Downloading: commons-codec-1.3.jar.sha1..... |
| Error Plugin [spock] is aliased as [grails.plugin.location.spock] to the location [grails-spock] in grails-app/conf/BuildConfig.groovy. You cannot upgrade a plugin that is configured via BuildConfig.groovy, remove the configuration to continue. |
To recreate, have something like this in your BuildConfig.groovy, and run your application up:
plugins {
test ':geb:0.6.0',
':spock:0.5-groovy-1.7'
}
Now, comment out the spock dependency, and add the following line and run it again:
grails.plugin.location.spock = 'grails-spock'
You will receive the message above.
No amount of cleaning/removing plugins and dependencies fixes this. I'm actually at a point now where I don't know how I can use the inPlacePlugin, as I can't seem to get rid of the spock-0.5-groovy1.7
Currently receiving the following message after commenting out ALL references to the spock plugin:
| Error Error loading event script from file [/home/ant/.grails/2.0.0.M2/projects/my-project/plugins/tomcat-2.0.0.M2/scripts/_Events.groovy] The Spock compiler plugin could not run because Spock 0.5.0-groovy-1.7 is not compatible with Groovy 1.8.2. For more information, see http://versioninfo.spockframework.org Spock location: file:/home/ant/.grails/ivy-cache/org.spockframework/spock-core/jars/spock-core-0.5-groovy-1.7.jar Groovy location: file:/usr/share/grails/2.0.0.M2/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-1.8.2.jar (Use --stacktrace to see the full trace) |
| Compiling 62 source files. |
| Error Compilation error: The Spock compiler plugin could not run because Spock 0.5.0-groovy-1.7 is not compatible with Groovy 1.8.2. For more information, see http://versioninfo.spockframework.org Spock location: file:/home/ant/.grails/ivy-cache/org.spockframework/spock-core/jars/spock-core-0.5-groovy-1.7.jar Groovy location: file:/usr/share/grails/2.0.0.M2/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-1.8.2.jar |
I'm not sure of the issue but I faced the same error that "The Spock compiler plugin could not run because Spock 0.5.0-groovy-1.7 is not compatible with Groovy 1.8.2".
You can use the snapshot version of the spock plugin
try:
plugins { test ':geb:0.6.0', ':spock:0.6-SNAPSHOT' }But still the geb plugin downloads groovy 1.7 and the worst part is, it downloads groovy 1.7 every time you run the app.
BTW by using the above you'll be able to run the app.