ローカルMavenリポジトリとしてnexusをセットアップしました。私は2つのプロキシリポジトリが必要です。 1つは、reficio repositoryからの別の中央の依存関係を取得します。Nexusリポジトリに複数のプロキシリポジトリを作成するにはどうすればいいですか?
新しいプロキシリポジトリmaven-reficioを作成し、それをグループリポジトリmaven-publicに追加しました。また、私は以下のようにsettings.xmlを編集しましたpost。
しかし、私はまだreficioリポジトリから依存関係を取得できず、キャッシュされていない依存関係も取得できません。お知らせ下さい。
私のsettings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups></pluginGroups>
<proxies></proxies>
<servers></servers>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/repository/maven-public/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>reficio</id>
<name>Reficio repository</name>
<url>http://repo.reficio.org/maven/</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
ここではkhmarbaiseを聞いた後、私の問題を解決し、私の最終のsettings.xmlです:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/repository/maven-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>https://repo1.maven.org/maven2/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>reficio</id>
<url>http://repo.reficio.org/maven/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>reficio</id>
<url>http://repo.reficio.org/maven/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
は、ネクサスの達人 - 公開グループで定義されたプロキシリポジトリの使用方法を定義し、設定からrepo.reficio.orgを削除します。 – khmarbaise
khmarbaise、 "設定からrepo.reficio.orgを削除する"というのは、URLのみかプロファイル全体のタブを意味しますか? – Gazelover