Maven:经常从远程存储库下载的元数据xml文件 [英] Maven: metadata xml files downloaded often from remote repositories

查看:127
本文介绍了Maven:经常从远程存储库下载的元数据xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Maven处理Java项目.我以为只有在第一次编译时才需要Internet连接,才能从远程存储库下载所需的库,但是每当编译代码时,我都会收到几条下载消息.此类消息:

I'm using Maven to handle a Java project. I thought that Internet connectivity was only needed in the 1st compile to download the required libraries from the remote repositories, but I get several download messages whenever I compile code. Messages like these:

Downloading: http://repo.maven.apache.org/maven2/org/eclipse/core/resources/maven-metadata.xml
Downloading: http://repository.springsource.com/maven/bundles/external/org/eclipse/core/resources/maven-metadata.xml
Downloading: http://repository.springsource.com/maven/bundles/release/org/eclipse/core/resources/maven-metadata.xml
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/eclipse/core/resources/maven-metadata.xml

为什么会发生这种情况以及如何预防呢?

Why that happens and how I could prevent it?

推荐答案

最重要的事情是开始使用 settings.xml文件中的配置可以配置为检查远程存储库(更新策略).

The most important thing is to start using a repository manager furthermore check the configuration in your settings.xml file which can be configured to check the remote repositories (update policy).

这篇关于Maven:经常从远程存储库下载的元数据xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆