Maven 类路径容器刷新作业

发布于 2024-07-27 13:05:16 字数 214 浏览 3 评论 0原文

我被 m2eclipse 和 Maven 困住了。 添加一些依赖项(hibernate 3.4,但我想这并不重要)后,eclipse 遇到了如标题所示的消息。 从 pom 文件中删除依赖项也没有帮助。 重新启动 Eclipse,将其作为存储库中的干净项目进行检查。 Alwyas 陷入了刷新的困境。 :/

什么会让 (m2)eclipse 停留在刷新项目上? 欢迎所有想法。

I get stuck with m2eclipse and maven. After adding some dependency (hibernate 3.4, but I guess that doesn't really matter) eclipse got stuck with a message like in the title. Removing the dependency from pom file didn't help either. Restarting eclipse, checking out this as a clean project from repo neither. Alwyas gets stuck on refreshing. :/

What can get (m2)eclipse stuck on refreshing the project? All ideas welcome.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魂牵梦绕锁你心扉 2024-08-03 13:05:16

工作空间解析确实会减慢依赖解析速度。 Maven 需要对每个项目进行部分计算以确定依赖关系层次结构,随着相关项目数量的增加,执行此操作所需的时间会迅速增加。 为了限制这种情况,请关闭您不处理的项目或取消选中解析工作区项目的选项(这样 Maven 将从本地存储库解析依赖项,这意味着您需要在每次更新后安装项目)。

如果这没有帮助,请尝试以下方法之一:

您的 Maven 设置正确吗? 可能是首选项没有指向您的平台安装,因此 Maven 正在后台将依赖项下载到您的用户主目录 - 这可能需要很长时间。 如果是这样,请调整这些设置。 选择Window->Preferences->Maven并检查是否使用嵌入式Maven。

如果您使用代理,则需要在您的首选项中设置代理设置,但如果问题是间歇性的,则不会是这样。

有时持久化容器不会更新,我一直无法准确找出原因。 我发现关闭项目并重新打开可以使容器恢复生机。

Workspace resolution can really slow the dependency resolution down. Maven needs to partially calculate each project to determine the dependency hierarchy, the time taken to do this increases rapidly as the number of related projects increases. To limit this, close projects you're not working on or uncheck the option to resolve workspace projects (so Maven will resolve the dependencies from the local repository, this means you need to install the projects after each update though).

If that doesn't help, try one of these:

Are your Maven settings correct? It may be that the preferences are not pointing to your platform install so Maven is downloading the dependencies to your user home in the background - this can take ages. If so tweak those settings. Select Window->Preferences->Maven and check if it is using the embedded Maven or not.

If you are behind a proxy you will need to set the proxy settings in your preferences, though if the problem is intermittent it won't be that.

Sometimes the persisted container isn't updated, I've never been able to isolate exactly why. I've found that closing the project and reopening can prod the container back into life.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文