我有一个依赖如下:当我部署行家依赖拉动了错误的依赖
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2</version>
<scope>compile</scope>
</dependency>
这是拉低另一个依赖httpcore.4.1.4
它抛出一个ClassDefNotFound,httpcore.4.2
一切正常。
我加入这两个之间的依赖关系如下:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2</version>
<scope>compile</scope>
</dependency>
,仍然面临着同样的问题,即:MVN带来下来httpcore.4.1.2
不httpcore.4.2
我怎样才能解决这个问题?
编辑:
增加;
'$ mvn dependency:tree -Dverbose -Dincludes = httpcore',它将在依赖关系树中显示所有版本的'httpcore',包括那些省略的。它会告诉你在哪里/为什么得到版本“4.1.4” – Hong