1

用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>

maven-metadata.xml和一个 nexus maven 代理(版本 2.7.2-03)我必须每天早上 00:00 之后等待一堆非常缓慢的文件下载(对于一些应该在几秒钟内传输的 KB 大约需要 5 分钟) . 如何预取这些文件以便将它们下载到我的本地 nexus 实例?

4

1 回答 1

0

听起来您有一个或多个代理存储库,其中的远程响应非常缓慢。这些缓存超时一天一次,导致检索非常缓慢。

有关如何调试此问题的信息,请参阅此处,并配置 Nexus 以防止问题再次发生:

https://support.sonatype.com/entries/25884097-Troubleshooting-slow-maven-metadata-xml-download-speeds

于 2014-04-21T15:06:09.970 回答