【问题标题】:Geb-core 3.2 conflict with groovy 2.5.8Geb-core 3.2 与 groovy 2.5.8 冲突
【发布时间】:2019-11-01 11:41:28
【问题描述】:

我尝试将最后一个 groovy 2.5.8 与 geb-core 3.2 一起使用。

例如

@Grapes([
        @Grab("org.gebish:geb-core:3.2"),
        @Grab("org.seleniumhq.selenium:selenium-firefox-driver:3.141.59"),
        @Grab("org.seleniumhq.selenium:selenium-support:3.141.59")
])
import geb.Browser
browser = new Browser()
println "Hello from test"

生成错误

C:\PROJ\bitb\checkBoard\test>groovy runTest.groovy org.codehaus.groovy.control.MultipleCompilationErrorsException: 启动失败:转换过程中的一般错误:冲突模块 版本。模块 [groovy-xml 在 2.5.8 版本中加载,您是 尝试加载 2.5.6 版

如果我将 geb-core 更改为 2.3.1,它运行良好。也许我应该改变一些配置?

提前致谢!

【问题讨论】:

    标签: groovy geb


    【解决方案1】:

    Geb 依赖于 Groovy,但在运行脚本时您已经加载了 Groovy - 您需要获取排除 Groovy 模块:

    @Grapes([
            @Grab("org.gebish:geb-core:3.2"),
            @Grab("org.seleniumhq.selenium:selenium-firefox-driver:3.141.59"),
            @Grab("org.seleniumhq.selenium:selenium-support:3.141.59"),
            @GrabExclude("org.codehaus.groovy:groovy-all")
    ])
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-08
      • 2016-10-14
      • 2015-06-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多