3 つのプロジェクトがあります。B は A に依存し、C は A と B に依存します。A と B は両方とも、バージョン 1 のパッケージ P、つまり P1 に依存します。ここで、C は P の別のバージョンを導入し、P2 と名付けます。
依存関係ツリーは次のようになります
P1 P1
^ ^
| |
A <- B
^ ^
\ /
\ /
C -> P2
pom.xml
P の競合を避けるために、 A と B の を変更して P1 を削除すること
にしmvn eclipse:eclipse
ました。
次に、すべてのプロジェクトを注意深くチェックしました。
In A: Re-check the pom.xml -> NO dependency of P1 , it won't resolve P1 !
In B: Re-check the pom.xml -> NO dependency of P1 , it won't resolve P1 !
In C: Re-check the pom.xml -> NO dependency of P1 itself , but it DOES resolve P1!
|
| - Comment out dependency of A: Resolve P1 !
|
| - Comment out dependency of B: Resolve P1 !
|
| - Comment out dependency of both A & B: Won't resolve P1 !
Finally, I make sure that other packages of A , B and C that depend on do not
depend on P1(Actually, P1 is a small SDK with limited usage, I'm sure other
packages won't denpend on it)
ここに奇妙なことがあります。チェックから、A または B のいずれかが P1 を導入しているように見えますが、A と B ではそれぞれ、どちらも P1 を導入しないとチェックして結論付けています。
何か間違っていますか?
アップデート
私は最終的に何が間違っているのかを理解しています。答えを見てください。