【Caused by】signer information does not match

2018.10.23

前言

A ---> B ---> C
|_____________↑

某個項目裏,A模塊依賴於B模塊和C模塊,B模塊也依賴於C模塊。它們各自都會依賴某些相同第三方庫,如hadoop-common,但版本不完全一致。

方法

一般是因爲依賴衝突。在這個case裏,通過分析dependencyTree(mvn dependency:tree > C:\dependencyTree.txt1),發現是A和B分別依賴於不同版本的庫。在pom中exclude解決了該問題:

<dependency>
	<groupId>B.groupId</group>
	<artifactId>B.artifactId</artifactId>
	<version>xx-SNAPSHOT</version>
	<exclusions>
		<exclusion>
			<groupId>conflict.groupId</groupId>
			<artifactId>conflict.artifactId</artifactId>
		</exclusion>
	</exclusions>
</dependency>

參考閱讀


  1. Maven Cheat Sheet ↩︎

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章