【发布时间】:2014-06-04 06:24:54
【问题描述】:
用maven3配置文件settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<!--<host>webproxy</host>-->
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://richter-local.de:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>nexus</id>
</server>
</servers>
<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>
<updatePolicy>interval:10080</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:10080</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
<updatePolicy>interval:10080</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>interval:10080</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
<interactiveMode>true</interactiveMode>
<usePluginRegistry>false</usePluginRegistry>
<offline>false</offline>
</settings>
和一个 nexus maven 代理(版本 2.7.2-03)我必须在每天上午 00:00 之后等待一堆非常缓慢的 maven-metadata.xml 文件下载(大约需要 5 分钟的时间来获取一些 KB,这应该在几秒钟内传输)。如何预取这些文件以便将它们下载到我的本地 nexus 实例?
【问题讨论】:
-
您的构建是否需要大量快照依赖项?
-
我正在获取一些快照(50 个依赖项中的 2 个),我也想处理它们,即预取跳过缓慢下载所需的数据。
标签: maven maven-3 nexus maven-metadata