Eclipse:依赖管理

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/142504/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:19:35  来源:igfitidea点击:

Eclipse: Dependency Management

javaeclipsemaven-2eclipse-plugindependencies

提问by Ande Turner

What are some methods of utilising Eclipse for Dependency Management?

使用 Eclipse 进行依赖管理的方法有哪些?

回答by polarbear

I really like the The Maven Integration for Eclipse (m2eclipse, Eclipse m2e). I use it purely for the dependency management feature. It's great not having to go out and download a bunch of new jars new each time I set up a project.

我真的很喜欢Eclipse 的 Maven 集成(m2eclipse,Eclipse m2e)。我纯粹将它用于依赖项管理功能。每次我建立一个项目时,不必出去下载一堆新的新罐子,真是太棒了。

回答by Ken Liu

A simpler way to go is the Maven Eclipse plugin(as opposed to a Maven plugin for Eclipse). It's simply a maven plugin that generates the .project and .classpath file based on the contents of the pom, you just run mvn eclipse:eclipseand you're done. It uses a classpath variable in Eclipse to locate the local maven repo.

更简单的方法是使用Maven Eclipse 插件(与Eclipse的 Maven 插件相反)。它只是一个 maven 插件,它根据 pom 的内容生成 .project 和 .classpath 文件,您只需运行即可mvn eclipse:eclipse完成。它使用 Eclipse 中的类路径变量来定位本地 maven 存储库。

I personally prefer this approach most of the time because you have more control over when the maven plugin updates are done. It's also one less Eclipse plugin to deal with. The GUI features of the m2eclipse plugin in the latest version is pretty nice, though.

大多数时候我个人更喜欢这种方法,因为您可以更好地控制 Maven 插件更新的时间。它还少了一个需要处理的 Eclipse 插件。不过,最新版本的 m2eclipse 插件的 GUI 功能非常好。

There's also an alternative to the m2eclipse plugin called Q4E, now called Eclipse IAM.

还有一个 m2eclipse 插件的替代品,称为Q4E,现在称为Eclipse IAM

回答by Dave

Another option is ivy. Ivy has eclipse integration as well.

另一种选择是常春藤。Ivy 也有 Eclipse 集成。

A comparison of maven and ivy can be found here: http://ant.apache.org/ivy/m2comparison.html

可以在此处找到 maven 和 ivy 的比较:http: //ant.apache.org/ivy/m2comparison.html