Can I Configure m2eclipse through pom.xml?

Sean Patrick Floyd picture Sean Patrick Floyd · Nov 8, 2010 · Viewed 7.2k times · Source

With the maven-eclipse-plugin, using mvn eclipse:eclipse, you can specifiy eclipse project natures and builders that will automatically be added to the eclipse project.

Earlier versions of m2eclipse used the configuration block of the maven-eclipse-plugin and also let you activate natures and builders using the same mechanisms. This seems to no longer be the case because a) I can't find any reference to maven-eclipse-plugin in the m2eclipse sources and b) it just doesn't work :-)

So this is my question: is there any way to configure the eclipse project generated by m2eclipse from the pom.xml? Specifically: project builders and natures, but I'd be interested in other options as well.

Answer

Pascal Thivent picture Pascal Thivent · Nov 8, 2010

The following thread summarizes almost everything. First, it explains that m2eclipse doesn't and won't support anything from the Maven Eclipse Plugin anymore because:

  1. Sonatype doesn't maintain it.
  2. It causes them too much troubles.

Second, it states that the m2eclipse way to handle additional project natures and builders is to write project configurators:

(...) we encourage writing configurators to add the natures and builders you want based on what it available in the POM.

See this link for a guide and this project for some existing configurators for checkstyle, findbugs, pmd.