我正在一个maven项目中工作,该项目声明了以下maven依赖项
<properties>
<httpclient.version>4.2.5</httpclient.version>
<cf-client-lib.version>1.1.1</cf-client-lib.version>
....
</properties>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
</dependency>
<dependency>
<groupId>org.cloudfoundry</groupId>
<artifactId>cloudfoundry-client-lib</artifactId>
<version>1.1.1</version>
</dependency>
...
<depedencies>
cloudfoundry-client-lib
使用httpclient
版本4.3.6的问题。我已将此问题视为Maven dependency hell。真的,我找到关于a similar problem的帖子(使用相同的例子)。
我使用mvn dependency:tree -Dverbose
检查了问题,因为它显示为official documentation:
[INFO] +- org.cloudfoundry:cloudfoundry-client-lib:jar:1.1.1:compileRELEASE:compile - omitted for conflict with 4.0.5.RELEASE)
[INFO] | +- (org.apache.httpcomponents:httpclient:jar:4.2.5:compile - version managed from 4.3.6; omitted for duplicate)
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.2.5:compile
[INFO] | +- (org.apache.httpcomponents:httpcore:jar:4.2.5:compile)
我已阅读上述可能的解决方案[S1] [S2]但我认为我必须将我的项目更新为最新的库版本(4.3.6
)(然后,我可以使用dependencyConvergence plugin)。但是,我能否找到一个更简单的和时间解决方案来继续当前的开发?