为什么Eclipse需要这么长时间来更新Maven依赖关系? [英] Why does Eclipse take so long to update Maven dependencies?

查看:1134
本文介绍了为什么Eclipse需要这么长时间来更新Maven依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Eclipse工作区中有一个Maven项目。当我启动Eclipse时,需要很长时间来更新Maven依赖项。实际上,它似乎永远不会完成,而它正在做这个更新,我不能在Eclipse中做任何事情。



有人可以帮助我吗?

解决方案

首先检查所有依赖项,包括依赖关系树中的插件和子代码,

尝试使用发行版替换快照版本,

作为快照版本将始终寻找以后的更新,而

版本被认为是稳定的,并且不会对相同的版本号进行更新。



其次,假设您正在使用局域网,我建议您安装本地的maven仓库管理器,例如Nexus ,然后通过设置

< mirrorOf> *< / mirrorOf> 重定向您的工件请求在$ {user.home} /。m2 / settings.xml



这将使您的下载能够快速解决本地镜像,而不是不断检查存储库在互联网上。


I have a Maven project in my Eclipse workspace. When I start Eclipse, it takes a very long time to update Maven dependencies. It actually seems like it will never finish and while it is doing this update, I can't do anything in Eclipse.

Can anybody help me?

解决方案

First check all of your dependencies including plugins and children in the dependency tree,
try to replace snapshot versions with release versions,
as snapshot versions will always look for a later update, whereas
release versions are deemed to be stable and updates are not expected for the same version number.

Secondly, assuming that you are working on a LAN, I would suggest that you install a local maven repository manager such as Nexus, and then redirect your artifact requests by setting
<mirrorOf>*</mirrorOf> in your ${user.home}/.m2/settings.xml

This will enable your downloads to be resolved quickly against a local mirror, rather than continually checking against repositories on the internet.

这篇关于为什么Eclipse需要这么长时间来更新Maven依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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