Geb 安装说明 ( http://www.gebish.org/manual/current/intro.html#installation__usage ) 表示使用以下 Grapes
注释来获取 Geb 依赖项。
@Grapes([
@Grab("org.gebish:geb-core:0.9.3"),
@Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.41.0"),
@Grab("org.seleniumhq.selenium:selenium-support:2.41.0")
])
但是,我收到以下错误:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [download failed: org.apache.httpcomponents#httpclient;4.3.1!httpclient.jar, download failed: org.apache.httpcomponents#httpcore;4.3!httpcore.jar, download failed: commons-codec#commons-codec;1.8!commons-codec.jar]
据我所知,依赖项可在此处获得:http://search.maven.org/#artifactdetails%7Corg.apache.httpcomponents%7Chttpclient%7C4.3.1%7Cjar
Grape
不使用 Maven Central 吗?我如何让它解决依赖性?
最佳答案
根据 http://groovy.codehaus.org/Grape 的文档默认是mavencentral。您可以使用 @GrabResolver(name='reSTLet', root='http://maven.reSTLet.org/')
添加自己的存储库(请参阅链接)。您还可以使用命令行工具 grape
进一步调查错误,例如grape -V install org.apache.httpcomponents httpclient 4.3.1
。
关于maven - Groovy Grape 从哪里获取依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24818903/