5
Nexusサーバーに到達できない場合、自動的にmaven centralからアーティファクトを自動的にダウンロードしようとするようにビルドをセットアップしたいと思います。私はsettings.xmlに次のようなことがあります。リポジトリマネージャを使用するためにはnexusサーバが停止している場合、mavenをmavenにアクセスするように設定するにはどうすればよいですか?
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://mynexus</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://mynexus</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
+1。 さらに、「到達不能」とは、彼が「オフィスにいなくてVPNを持っていないとき」という意味だと信じています。 – carlspring
ありがとうございますが、実際には到達できませんでした。私は、Nexusサーバをホストしているノード上のネットワーキングの問題のような、より壊滅的なものを意味しました。私は、ネクサスの問題が診断されている間にビルドを中断しないように、その場合は中央に自動フェイルオーバーすることを望んでいました。 –
これは理にかなっていますが、現実的には役に立たないでしょう。理由は次のとおりです。通常、Nexusは、内部のリリースリポジトリを含む、セントラルだけではありません。グループ設定の順序付けやルーティングルールによって、Nexusがアーチファクトをどのように見つけるかに影響を与えることができます。あなたが突然それをすべて外してしまった場合、デベロッパーが違う結果を得るのが最善のケースです。ほとんどの場合、ビルドの失敗の結果として見つからないものがあります。 –