Maven Eclipse Checkstyle Plug-in

This plug-in is designed for Maven 1.0.X

It's purpose is to generate .checkstyle files that are used by the Eclipse Checkstyle Plug-in (now bundled in Eclipse 3.2-Callisto). It is designed as an addon to the Maven Eclipse Plug-in and it shares some properties with the Maven Checkstyle Report plug-in.

Maven Integration

The best way to integrate maven-eclipse-checkstyle is to add it as a post-goal to the eclipse:eclipse goal as follow:

<postGoal name="eclipse:eclipse">
	<attainGoal name="eclipse:checkstyle"/>
</postGoal>

Eclipse Integration

Your eclipse projects will required to have the nature com.atlassw.tools.eclipse.checkstyle.CheckstyleNature and the buildercom.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder. There are several ways of working with that.

Handle manually the activation of the checkstyle plugin in eclipse. This would mean that after each maven:eclipse after a refresh in eclipse you would have to recheck the activation of the checkstyle plug-in in eclipse using the project properties.

You could also automate the addition of the nature and builder in the maven-eclipse plugin using the maven.eclipse.projectnatures and maven.eclipse.buildcommands properties.

maven.eclipse.buildcommands=com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder
maven.eclipse.projectnatures=com.atlassw.tools.eclipse.checkstyle.CheckstyleNature

Finaly, you could also simply enable a feature of this plugin using:

maven.eclipse.checkstyle.modify.project=true
Attention because this last method, while the easiest and more flexible comes with strings attached. First, you need to read the problem here. You can work around that known maven problem by copying in your maven installation directory under lib/endorsed a jar for xalan (ex: version 2.6.0 works great).