作为我的 Happy Trails 应用程序的一部分,我正在尝试从 Grails 2.0.3 升级到 2.2.1。
https://github.com/jamesward/happytrails/tree/grails2
我遇到的第一件事就是让 Geb/Spock 与 Groovy 2 一起工作。在尝试安装插件或执行任何操作时,我遇到了以下错误。
| 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
我能够使用Grails 2.2 的 spock 指令来解决这个问题。
但是,现在我遇到了一个奇怪的错误,Grails 似乎正在尝试从本地存储库下载文章。
$ 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
到目前为止,这是我的项目的差异: