I'm trying to upgrade from Grails 2.0.3 to 2.2.1 as part of my Happy Trails application.
https://github.com/jamesward/happytrails/tree/grails2
The first thing I struggled with was getting Geb/Spock to work with Groovy 2. I was getting the following error when trying to install plugins or do just about anything.
| Resolving plugin JAR dependencies
| Error WARNING: Dependencies cannot be resolved for plugin [mail] due to error: startup failed:
Could not instantiate global transform class org.spockframework.compiler.SpockTransform specified at jar:file:/Users/mraible/.grails/ivy-cache/org.spockframework/spock-core/jars/spock-core-0.7-groovy-1.8.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation because of exception org.spockframework.util.IncompatibleGroovyVersionException: The Spock compiler plugin cannot execute because Spock 0.7.0-groovy-1.8 is not compatible with Groovy 2.0.7. For more information, see http://versioninfo.spockframework.org
I was able to workaround this using the spock instructions for Grails 2.2 .
However, now I'm stuck with a strange error where Grails seems to be trying to download articles from a local repository.
$ grails compile
| Configuring classpath
:: problems summary ::
:::: ERRORS
Server access Error: Connection refused url=http://localhost:8081/artifactory/plugins-releases-local/org/codehaus/geb/geb-spock/0.9.0-RC-1/geb-spock-0.9.0-RC-1.pom
Server access Error: Connection refused url=http://localhost:8081/artifactory/plugins-releases-local/org/codehaus/geb/geb-spock/0.9.0-RC-1/geb-spock-0.9.0-RC-1.jar
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.codehaus.geb:geb-spock:0.9.0-RC-1
Here's the diff for my project so far:
I can't reproduce for love nor money, but I'll hazard a guess that you have stale dependency information in the Ivy cache. Try moving ~/.grails/ivy-cache
to /var/tmp
and running grails compile
. If that works, you can leave things as they are, or restore the old cache and just delete the geb related directories:
Now that I have looked at the source code for the project, I'm going to offer up another suggestion: remove all the plugin entries from application.properties
and add the ones you need to BuildConfig.groovy
.
I think the big problem here is that geb 0.7.0 is declared in application.properties
while 0.9.0-RC-1 is in BuildConfig.groovy
. You don't need the svn
plugin entry, so don't add that to BuildConfig.groovy
. And you will have to upgrade Searchable plugin to 0.6.4.
尝试删除(重新命名)〜/ .grails / 2.2.1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.