私はかなりクレイジーに聞こえる次の問題を抱えています。私は、Lib Cを使用するLib Bを使用するプロジェクトAを持っています.Lib Cは中央にありません。Lib B には、lib C を見つけることができるリポジトリを定義する親があります。mvn のバージョンと他のスパイスによっては、機能するかどうかが異なります。プロジェクトは MoSKito: https://github.com/anotheria/moskitoです。MoSKito は xchart (com.xeiam.xchart:xchart 2.5.0) に依存しています。xchart は VectorGraphics2D (de.erichseifert.vectorgraphics2d:VectorGraphics2d:0.9.1) を使用します。VectorGraphics2D は中央にありません。
xchart は、その親 (com/xeiam/xchart/xchart-parent/2.5.0/xchart-parent-2.5.0.pom) で VectorGraphics2D の依存関係を定義しています。
<repositories>
<repository>
<id>erichseifert.de</id>
<url>http://mvn.erichseifert.de/maven2</url>
</repository>
</repositories>
元の問題に戻ります。自分のマシンで MoSKito をビルドすると、VectorGraphics2D がhttp://mvn.erichseifert.de/maven2からダウンロードされます。ビルドログに表示され、リポジトリにも存在し、ファイル _remote.repositories には次のコンテンツが含まれています。
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Wed Oct 28 16:18:30 CET 2015
VectorGraphics2D-0.9.1.jar>erichseifert.de=
VectorGraphics2D-0.9.1.pom>erichseifert.de=
他の誰かが MoSKito をビルドした場合、ファイルはダウンロードされず、エラー メッセージは次のようになります。
[ERROR] Failed to execute goal on project moskito-webui: Could not resolve
dependencies for project net.anotheria:moskito-webui:jar:2.6.4-SNAPSHOT: Failure
to find de.erichseifert.vectorgraphics2d:VectorGraphics2D:jar:0.9.1 in
http://nexus.locale/nexus/content/groups/provided was cached in the local
repository, resolution will not be reattempted until the update interval of nexus
has elapsed or updates are forced -> [Help 1]
この問題を解決するために行うことができる設定はありますか?それは少なくとも決定論的ですか?
PSこの質問をmaven force update dependencies questionの複製としてマークした人は誰でも、依存関係の更新とは何の関係もありません。これは、参照プロジェクトで指定されたリポジトリからアーティファクトを解決する Maven に関するものです。うまくいくこともあれば、うまくいかないこともあります。