【发布时间】:2014-08-31 17:12:44
【问题描述】:
我正在尝试通过排除 httpclient-4.3.1.jar 而包括 httpclient-4.3.2.jar 来解决我的 Grails 应用程序中的 this issue。
我设法包含了 4.3.2,但我的问题是我无法真正理解为什么包含 4.3.1。我已经运行了grails dependency-report,但这只是显示版本 4.1.2 包含在几个不同的插件中。 4.3.1 似乎包含在“根”级别,如下所示:
...
+--- org.apache.httpcomponents:httpclient:4.3.1
...
我尝试在BuildConfig.groovy 的dependencies 块中添加一些excludes 行:
excludes 'org.apache.httpcomponents:httpcore:4.3.1'
excludes 'org.apache.httpcomponents:httpclient:4.3.1'
但我不确定这是否是有效的语法。如何排除这个版本的httpclient jar?
编辑:
我还尝试将这些依赖项的excludes 添加到BuildConfig.groovy 中的global 块中:
inherits("global") {
excludes 'org.apache.httpcomponents:httpcore:4.3.1', 'org.apache.httpcomponents:httpclient:4.3.1'
}
还有这个:
inherits("global") {
excludes 'httpcore:4.3.1', 'httpclient:4.3.1'
}
但这似乎也不起作用。
【问题讨论】:
标签: grails dependencies ivy apache-httpclient-4.x