grails - 从Grails 2.0.3升级到2.2.1:服务器访问错误:连接被拒绝

标签 grails grails-plugin spock geb

我正在尝试从Grails 2.0.3升级到2.2.1,作为Happy Trails应用程序的一部分。

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

我能够使用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

这是到目前为止我的项目的差异:

https://gist.github.com/mraible/5161209

最佳答案

现在,我已经查看了该项目的源代码,我将提出另一个建议:从application.properties中删除所有插件条目,并将所需的插件条目添加到BuildConfig.groovy中。

我认为这里的最大问题是在application.properties中声明了geb 0.7.0,而在BuildConfig.groovy中声明了0.9.0-RC-1。您不需要svn插件条目,因此请勿将其添加到BuildConfig.groovy。而且您将必须将Searchable插件升级到0.6.4。

关于grails - 从Grails 2.0.3升级到2.2.1:服务器访问错误:连接被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15410368/

相关文章:

grails - 为什么 map.collectEntries() 不适用于此数据 [[Name :sub, Value:23234]] - Groovy

grails - 如何将 OAuth 身份验证与 Spring Security 联系起来

grails - ElasticSearch插件导致服务器在Grails 3.1.6中停止

grails - grails “test-app”无法通过功能性geb + spock测试,但是 “test-app -functional”成功

Grails - 提升 : Which framework is better suited for which kind of applications?

testing - Grails 自定义 taglib 在集成测试期间无法使用自定义工件

unit-testing - 如何使用多个私有(private)插件运行 Grails 应用程序的所有单元测试

grails - Multi-Tenancy 时如何使用DomainUnitTest进行测试

Grails Log4J 文件追加器不写入文件

grails - 如何在Grails中记录所有CRUD操作?