我正在尝试通过排除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
...
我尝试在
excludes
的dependencies
块中添加一些BuildConfig.groovy
行:excludes 'org.apache.httpcomponents:httpcore:4.3.1'
excludes 'org.apache.httpcomponents:httpclient:4.3.1'
但是我不确定这是否是有效的语法。如何排除此版本的
httpclient
jar?编辑:
我也尝试过将这些依赖项的
excludes
添加到global
中的BuildConfig.groovy
块中: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依赖项,因此应将它排除在继承(“global”)BuildConfig块中,而不是依赖项中。
关于grails - 无法从Grails应用程序中排除httpcomponents jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24674658/