无法从Grails应用程序中排除httpcomponents jar

无法从Grails应用程序中排除httpcomponents jar,grails,dependencies,ivy,apache-httpclient-4.x,Grails,Dependencies,Ivy,Apache Httpclient 4.x,我试图通过排除httpclient-4.3.1.jar而包括httpclient-4.3.2.jar来解决Grails应用程序中的问题 我已经设法包括4.3.2,但我的问题是,我真的不明白为什么要包括4.3.1。我已经运行了grails依赖关系报告,但这只是显示了4.1.2版包含在几个不同的插件中。4.3.1似乎包含在“根”级别,如下所示: ... +--- org.apache.httpcomponents:httpclient:4.3.1 ... 我已尝试在BuildConfig.groo

我试图通过排除
httpclient-4.3.1.jar
而包括
httpclient-4.3.2.jar
来解决Grails应用程序中的问题

我已经设法包括4.3.2,但我的问题是,我真的不明白为什么要包括4.3.1。我已经运行了
grails依赖关系报告
,但这只是显示了4.1.2版包含在几个不同的插件中。4.3.1似乎包含在“根”级别,如下所示:

...
+--- org.apache.httpcomponents:httpclient:4.3.1
...
我已尝试在
BuildConfig.groovy
中的
依赖项
块中添加一些
排除
行:

excludes 'org.apache.httpcomponents:httpcore:4.3.1'
excludes 'org.apache.httpcomponents:httpclient:4.3.1'
inherits("global") {
    excludes 'org.apache.httpcomponents:httpcore:4.3.1', 'org.apache.httpcomponents:httpclient:4.3.1'
}
但我不确定这是否是有效的语法。如何排除此版本的
httpclient
jar

编辑:

我还尝试为这些依赖项向
BuildConfig.groovy
中的
global
块添加
excludes

excludes 'org.apache.httpcomponents:httpcore:4.3.1'
excludes 'org.apache.httpcomponents:httpclient:4.3.1'
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'
}
但这似乎也不起作用。



“org.apache.httpcomponents:httpclient:4.3.1”似乎是默认的grails依赖项,因此应该在继承(“全局”)BuildConfig的块中排除它,而不是在依赖项中排除它。

谢谢您的回答。。这似乎也不起作用。我已经更新了我的问题,以显示我的尝试。