我试图从Grails 2.0.3升级到2.2.1,作为我的Happy Trails应用程序的一部分。从Grails 2.0.3升级到2.2.1:服务器访问错误:连接被拒绝
https://github.com/jamesward/happytrails/tree/grails2
我是越来越盖布/斯波克挣扎的第一件事用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
我能解决这个问题,使用spock instructions for Grails 2.2。
但是,现在我遇到了一个奇怪的错误,其中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
下面是我的项目的DIFF至今:
https://gist.github.com/mraible/5161209
检查[GEB的grails例如拉入请求(https://github.com/geb/geb-example-grails/pull/7/文件)。这将该示例升级到2.2。 – 2013-03-14 13:46:36
你可以运行'dependency-report'命令吗?如果是这样,请在依赖关系中查找“geb-spock”。 Grails正在寻找它在错误的包(org.codehaus.geb是旧的),这表明一些陈旧的依赖性缓存信息。 – 2013-03-14 13:48:17
尝试将“legacyResolve true”添加到grails.project.dependency.resolution闭包中。只是为了确保它不是新的解析器。 – 2013-03-14 14:24:32