1
votes

With the maven eclipse plugin, I can configure checkstyle or sonar configurations by adding the necessary invocations to the pom.xml and calling "mvn eclipse:eclipse" to create the project configuration.

Some members of my team want to just use "Import Maven project" and therefore don't get the benefits of the project preconfigurations. Is there a way to provide the same (or similiar) hints to m2eclipse?

What I want to accomplish is that people simply "Import Maven Project", and they automatically get a project preconfigured with the correct checkstyle configuration (which is possibly downloaded from somewhere as defined in the POM) without having to manually go into the project preferences and click around a lot. That somehow defeats the purpose of automatic project generation :-)

2

2 Answers

1
votes

There are more detailed answers to this topic in Can I Configure m2eclipse through pom.xml?: Completely automatic configuration can only be achieved with a ProjectConfigurator. But there is a solution based on AntRun and XMLTask even for FindBugs and Sonar. It needs manual triggering only once after checkout.

0
votes

This is doable by writing custom ProjectConfigurator (as mentioned in this thread). And it looks like somebody plublished some of them (for Checkstyle, PMD, FindBugs) in the m2e-extensions project.