64

There is two available Eclipse plugins for Maven :

m2eclipse seems to be the oldest but the more robust. Is there any key differences between the two ?

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.

Michel
  • 2,454
  • 3
  • 20
  • 28
  • How can I tell if these 2 year old answers are up to date? – Dave L. Feb 08 '11 at 22:44
  • The answers are still up to date. But the question is not really anymore as m2eclipse is in the process of being moved to eclipse.org. I'll update the question with the info. – Michel Feb 09 '11 at 11:56
  • Eclipse IAM doesn't work with Eclipse Indigo https://bugs.eclipse.org/bugs/show_bug.cgi?id=351691 – Petteri H Nov 17 '11 at 14:47
  • m2e has its fair share of bugs and introduced new annoyances (See: [M2E plugin execution not covered](http://wiki.eclipse.org/M2E_plugin_execution_not_covered)), but as stated above IAM doesn't work under Indigo at all. – Powerlord May 18 '12 at 15:51

9 Answers9

42

I choose m2eclipse since it is stable and have all that I need. Especially ability to resolve dependencies inside workspace.

I tried the other one some time ago and didn't like it. It was to buggy so I gave up quickly.

Marko
  • 30,263
  • 18
  • 74
  • 108
  • I'm having exact the oposite experience with 0.10.0, hitting multiple m2eclipse bugs recently, like resources vanishing after a pom edit, update snapshots not working and more – mglauche Aug 03 '10 at 18:46
  • @mglauche i am experiencing the same problem, sometimes my entire source directory gets deleted – Suraj Chandran Feb 06 '11 at 17:03
12

The side by side comparison is moved to http://web.archive.org/web/20150526230611/http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration

BCG
  • 1,170
  • 8
  • 19
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
4

For me as a complete Maven-newbie the m2eclipse plugin 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.

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.

That said I cannot speak for or against IAM, as I never used it due to the good m2eclipse experience.

Bananeweizen
  • 21,797
  • 8
  • 68
  • 88
3

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.

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.

Jon Vaughan
  • 2,058
  • 1
  • 18
  • 11
  • Yeah I experienced that pain. I must say disabling automatic building in Eclipse helps a lot with that. I think m2eclipse might do a little too much on each build. – Michel May 27 '11 at 15:46
3

Side by side comparison of Maven plugins for Eclipse. It haven't been updated to recently added features. For example, see New and Noteworthy page for m2eclipse.

2

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...

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).

Choose:

  • m2e - if your project is small and you like fancy features like dependency trees
  • iam - if you need performance
tadaskay
  • 111
  • 4
1

what about multi modules project ?, m2eclipse plugin is ineffective. Especially if we use war module.

bora.oren
  • 3,439
  • 3
  • 33
  • 31
  • Why? m2eclipse worked fine for me with multi-module war project inside an ear. You may have to turn off resolving from workspace at the parent project...but it works. – Mike Cornell Nov 17 '09 at 15:46
  • If i turn off "Resolve Workspace Artifacts" then i must have to clean all project (eclipse/project/clean) which depends on super pom :( i don't want to do repeat clean process after maven clean, install or etc. Because projects give errors. But if i run it on command prompt nothing happens, everythings going well. – bora.oren Nov 24 '09 at 14:51
  • I cant fix it. I can't compile and install super project in m2eclipse, war project gives error like "Access Denied", plugin cant copy or move jar files to war project output path i think, i dont know. So i use m2eclipse plugin in eclipse to make dependency management and etc. I use mvn command prompt to make process on super pom till find solution. – bora.oren Nov 24 '09 at 14:52
1

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.

Did not like the experience at all.

Mario F
  • 45,569
  • 6
  • 37
  • 38
0

I am using m2eclipse ... thats the best and well documented too...

Praneel PIDIKITI
  • 18,677
  • 13
  • 41
  • 60