Java 哪个是最好的 Maven Eclipse 插件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/305250/
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
Which is the best Maven Eclipse plugin?
提问by Michel
There is two available Eclipse plugins for Maven :
Maven 有两个可用的 Eclipse 插件:
- Eclipse IAM(old name is Q4E)
- m2eclipse
- Eclipse IAM(旧名称为 Q4E)
- 日食
m2eclipse seems to be the oldest but the more robust. Is there any key differences between the two ?
m2eclipse 似乎是最古老但更强大的。两者之间有什么主要区别吗?
Which one should be chosen for a project starting today and why ?
从今天开始的项目应该选择哪一个,为什么?
UPDATE:m2eclipse is moving to eclipse.org and will be included in the Indigo release train (Eclipse 3.7). See m2e at Eclipse: What will this mean for you?and m2eclipse is moving to eclipse.org!. The accepted answer is thus even more correct.
更新:m2eclipse 正在移至 eclipse.org,并将包含在 Indigo 发行版系列 (Eclipse 3.7) 中。在 Eclipse 上查看m2e:这对您意味着什么?和m2eclipse的被移动到eclipse.org!. 因此,接受的答案更加正确。
采纳答案by Marko
I choose m2eclipsesince it is stable and have all that I need. Especially ability to resolve dependencies inside workspace.
我选择m2eclipse 是因为它稳定并且拥有我需要的一切。特别是能够解决工作空间内的依赖关系。
I tried the other one some time ago and didn't like it. It was to buggy so I gave up quickly.
前段时间我试过另一个,但不喜欢它。这是越野车所以我很快就放弃了。
回答by Mario F
I used m2eclipse. But I did never manage to launch the tests or the whole project from within eclipse (the project had nested folders for various sub-modules). When I used it they said support for that was experimental. The most I could get was syntax-checking and such. For the rest I used the console.
我使用了 m2eclipse。但我从未设法从 eclipse 中启动测试或整个项目(该项目具有用于各种子模块的嵌套文件夹)。当我使用它时,他们说对它的支持是实验性的。我最多能得到的是语法检查等。其余的我使用控制台。
Did not like the experience at all.
不喜欢经验可言。
回答by Bananeweizen
For me as a complete Maven-newbie the m2eclipseplugin worked quite well. We manage around 15 projects with it. The nested Maven projects will be flat in Eclipse (as it does not support nested projects), but all of them were automatically set up the right way, so everything works fine. Up to now I never needed to manually invoke a Maven command, for me using the preconfigured "run as" launch configurations did their job quite well.
对于我作为一个完整的 Maven 新手来说,m2eclipse插件运行良好。我们用它管理大约 15 个项目。嵌套的 Maven 项目在 Eclipse 中将是扁平的(因为它不支持嵌套项目),但是所有这些项目都是自动以正确的方式设置的,所以一切正常。到目前为止,我从来不需要手动调用 Maven 命令,对我来说,使用预配置的“运行方式”启动配置可以很好地完成它们的工作。
For me the quality of m2eclipse can be judged by this simple example: If you run Eclipse on a JRE instead of JDK, m2eclipse shows a warning that some of its features rely on a JDK. Nevertheless it still works on the JRE. And the warning dialog has hyperlinks to the Eclipse documentation about command line arguments and to the "Installed JREs" preferences, so you can easily fix the wrong Java VM.
对我来说,m2eclipse 的质量可以通过这个简单的例子来判断:如果你在 JRE 而不是 JDK 上运行 Eclipse,m2eclipse 会显示一个警告,说它的一些特性依赖于 JDK。尽管如此,它仍然适用于 JRE。警告对话框包含指向有关命令行参数的 Eclipse 文档和“已安装 JRE”首选项的超链接,因此您可以轻松修复错误的 Java VM。
That said I cannot speak for or against IAM, as I never used it due to the good m2eclipse experience.
这就是说我不能支持或反对 IAM,因为由于良好的 m2eclipse 体验,我从未使用过它。
回答by Bananeweizen
Side by side comparison of Maven plugins for Eclipse. It haven't been updated to recently added features. For example, see New and Noteworthypage for m2eclipse.
Eclipse 的 Maven 插件的并排比较。它尚未更新为最近添加的功能。例如,请参阅m2eclipse 的新的和值得注意的页面。
回答by baybora.oren
what about multi modules project ?, m2eclipse plugin is ineffective. Especially if we use war module.
多模块项目呢?,m2eclipse插件无效。特别是如果我们使用 war 模块。
回答by Archimedes Trajano
回答by Jon Vaughan
m2eclipse is ok (a lot more reliable than it was 1-2 years ago), but m2eclipse extras (which you need for WTP integration - WTP gives you the ability to run a server in the IDE) is a different matter - and not supported by Codehaus. Several times a week you will find that it hasn't copied resources to the appserver, or you get a NPE, or some other problem.
m2eclipse 还可以(比 1-2 年前更可靠),但是 m2eclipse 附加功能(WTP 集成需要它 - WTP 使您能够在 IDE 中运行服务器)是另一回事 - 并且不受支持科德豪斯。一周几次,您会发现它没有将资源复制到应用程序服务器,或者您遇到 NPE,或其他一些问题。
I have not used Eclipse IAM but I discovered this page whilst looking for alternatives to m2e because of these WTP issues. Intellij is calling, I think.
我没有使用过 Eclipse IAM,但由于这些 WTP 问题,我在寻找 m2e 的替代品时发现了这个页面。我想,Intellij 正在打电话。
回答by Praneel PIDIKITI
I am using m2eclipse ... thats the best and well documented too...
我正在使用 m2eclipse ......这也是最好的并且有据可查的......
回答by tadaskay
m2eclipse is fine for the small projects. But it has a very poor performance in huge enterprise projects. Even a smallest change in POMs would cause this plugin to "update dependencies" for hours...
m2eclipse 适用于小型项目。但它在大型企业项目中表现非常差。即使 POM 中最小的更改也会导致此插件“更新依赖项”数小时......
Since we switched to IAM, the problem's almost gone. Even if it takes a while for it to cope with the POM changes, it is still like minutes compared to hours (m2e).
自从我们切换到 IAM 后,问题几乎消失了。即使它需要一段时间来应对 POM 的变化,与小时 (m2e) 相比,它仍然像几分钟一样。
Choose:
选择:
- m2e - if your project is small and you like fancy features like dependency trees
- iam - if you need performance
- m2e - 如果您的项目很小并且您喜欢依赖树之类的奇特功能
- iam - 如果您需要性能