Java 你如何从eclipse刷新maven依赖?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/136308/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you refresh maven dependencies from eclipse?
提问by ScArcher2
We recently started using maven for dependency management. Our team uses eclipse as it's IDE. Is there an easy way to get eclipse to refresh the maven dependencies without running mvn eclipse:eclipse?
我们最近开始使用 maven 进行依赖管理。我们的团队使用 Eclipse 作为 IDE。有没有一种简单的方法可以让 eclipse 在不运行 mvn eclipse:eclipse 的情况下刷新 maven 依赖项?
The dependencies are up to date in the local maven repository, but eclipse doesn't pick up the changes until we use the eclipse:eclipse command. This regenerates a lot of eclipse configuration files.
依赖项在本地 maven 存储库中是最新的,但 eclipse 不会在我们使用 eclipse:eclipse 命令之前获取更改。这会重新生成很多 eclipse 配置文件。
采纳答案by Joe
回答by Chris Vest
You generate the special eclipse files with mvn eclipse:eclipse
, but once you've done that, you should let a pluginhandle the dependencies while inside eclipse.
您使用 生成特殊的 eclipse 文件mvn eclipse:eclipse
,但是一旦完成,您应该让插件在 eclipse 中处理依赖项。
That's how we do it at my work place, and it generally works well.
我们在我的工作场所就是这样做的,而且通常效果很好。