私は非常に遅い中央リポジトリをプロキシにネクサスを使用しようとしています。 だから。私はチュートリアルに従ってmavenを設定しました。proxingにnexusを使用しているときにpomにカスタムリポジトリを追加するにはどうすればいいですか?
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<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://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
すべてが正常に動作しています。しかし、私はpom.xmlに指定されたカスタムリポジトリを使用しようとしたときに問題に直面しました(このレポは具体的なプロジェクトにのみ必要です)
So.
<mirrorOf>*</mirrorOf>
へ:
Error resolving version for plugin 'com.google.protobuf.tools:maven-protoc-plugin' from the repositories [local (C:\Users\valden\.m2\repository), nexus (http://localhost:8081/nexus/content/groups/public)]: Plugin not found in any plugin repository -> [Help 1]
のMavenのsettings.xmlで、私は次の行を変更しました:エラーメッセージ
https://github.com/dtrott/maven-protoc-plugin#readme
:から<pluginRepositories>
<pluginRepository>
<id>dtrott</id>
<url>http://maven.davidtrott.com/repository</url>
</pluginRepository>
</pluginRepositories>
:私は話しています
<mirrorOf>central</mirrorOf>
、それは今働いている...
大きな感謝!私はあなたの質問/答えを見つけるまで、これを理解しようと15分間過ごしました。 –