3

I am an eclipse power and who has ignored maven due to the historically poor maven / eclipse integration. m2e seems to be maturing and I am taking it out for a serious test drive.

I want to understand how m2e works within eclipse, so I can better get the two working smoothly together and to understand the still cryptic error messages and problems that arise.

I have tried googling for an explanation of the m2e eclipse integration architecture and found nothing that provides a good account of how the integration works. rather just a lot of scattered blog posts all over the web.

Can anyone provide a solid overview of how m2e bridges the gap between the eclipse view of the world and maven view of the world? Especially how does maven integrate into the incremental builds that eclipse does? What is the impact on eclipse stability / performance from using m2e.

ams
  • 60,316
  • 68
  • 200
  • 288
  • m2eclipse is quite mature at this point (handles multi-module projects, EAR's, WAR's correctly. What error messages are you getting? (one tip m2eclipse and mvn eclipse:eclipse should *not* be used together). – Allen Parslow Nov 15 '12 at 19:45
  • 2
    what is eclipse power? – Junchen Liu Mar 27 '15 at 10:35

3 Answers3

3

I have found the details I was looking for in a Presentation from Eclipse Con titled "m2e, an exercise in mixing oil and water"

http://www.eclipsecon.org/europe2012/sites/eclipsecon.org.europe2012/files/EclipseConEU2012-m2e-talk.pdf

Abstract:

m2e is a popular Eclipse IDE plugin with stated project goal "to provide a first-class Apache Maven support in the Eclipse IDE". In this talk I will give an overview of Maven/Eclipse integration approach implemented by m2e, highlight differences between Maven and Eclipse that make proper integration difficult or impossible and will discuss possible ways to improve the integration. The talk is targeted at Eclipse and Maven developers who want to better understand challenges of Maven/Eclipse integration and advanced m2e users who want to know what happens "under the hood".

ams
  • 60,316
  • 68
  • 200
  • 288
  • Another link that might interest you: https://wiki.eclipse.org/M2E_plugin_execution_not_covered - and: https://docs.sonatype.org/display/M2ECLIPSE/Project+build+lifecycle+mapping – Mr_and_Mrs_D Jun 18 '14 at 13:55
1

In short, m2e will setup your Eclipse base on the Maven POMs of your projects, and it provides you access to Maven commands

these are some of the most obvious things m2e done:

  1. setup the source folder and output directory according to POM
  2. Setup dependencies/libraries and project dependency base on POM
  3. Use corresponding Eclipse plugins base on Maven plugins (if M2E knows how to deal with it) etc.
  4. Allow you to run Maven goals
  5. etc.....

It is neither a formal nor a accurate description, but I wish it give some basic idea :P

Adrian Shum
  • 38,812
  • 10
  • 83
  • 131
1

Sonatype has a pretty good book about it at http://www.sonatype.com/Support/Books/Developing-with-Eclipse-Maven

Eugene Ryzhikov
  • 17,131
  • 3
  • 38
  • 60
  • The book you link too explains how to use m2e I am looking for much lower level details on how m2e modifies the eclipse build cycle with custom builders, and the like, when do those builders run, what do they do ... etc. – ams Oct 30 '12 at 02:44
  • Not sure it is documented anywhere publicly. Though the code is open source - you can always take a look at it. – Eugene Ryzhikov Oct 30 '12 at 16:51