Я хотел бы создать локальный репозиторий maven компании, используя nexus. Репозиторий не должен скачивать что-либо из общедоступного Интернета, все необходимое добавляется к репо. Разработчики local maven instanses должны загружать необходимые библиотеки и инструменты из компании nexus. Мне удалось сделать это, используя зеркало, подобное этому в settings.xml:
<mirror>
<id>company-repository</id>
<name>Company releases repository</name>
<url>http://nexus.company.com/nexus/content/repositories/releases</url>
<mirrorOf>*</mirrorOf>
</mirror>
Проблема с этим решением заключается в том, что я могу указать только на релиз репозитория, я хотел бы также включить сторонний и репозиторий снимков для поиска. Кто-нибудь знает, как это сделать? Зеркальный тег занимает всего один URL.
Я также пробовал с определением профиля по умолчанию следующим образом:
<profile>
<id>defaultProfile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>company-thirdparty-repo</id>
<url>http://nexus.company.com//nexus/content/repositories/thirdparty</url>
<releases>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>company-releases-repo</id>
<url>http://nexus.company.com/nexus/content/repositories/releases</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://nexus.company.com/nexus/content/repositories/central</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
Проблема с этим решением заключается в том, что если Maven не найдет что-то из этих репозиториев, он все равно загружает его с repo.maven.apache.org. Буду признателен за любую помощь. Спасибо!