私は次のような依存関係を持っています:
<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
どうすればこれを解決できますか?
編集:
追加した;
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
</dependencyManagement>