title: How to configure Checkstyle in Eclipse for an maven project automatically
body: <p>I have a maven-multi project, when I create a new eclipse project from it (by M2E 1.0 "Checkout Maven Project from SCM) I want that the eclipse checkstyle plugin is configured for that project automatically.</p>
  
  <p>So I added the <code>maven-eclipse-plugin</code> in parent pom's  <code>&lt;pluginManagement&gt;</code> section and configured it to generate <code>.checkstyle</code> file as well as the additional project nature <code>CheckstyleNature</code>. In the modul poms I added the name of the <code>maven-eclipse-plugin</code> in the build section. But when I checkout the project nothing happend, the file is not generated and the nature is not added. </p>
  
  <p>So I think I am doing something completely wrong, but how is it done correct?</p>
  
  <hr>
  
  <p>Parent pom - plugin management section:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.8&lt;/version&gt;
      &lt;configuration&gt;
          &lt;downloadSources&gt;true&lt;/downloadSources&gt;
          &lt;downloadJavadocs&gt;false&lt;/downloadJavadocs&gt;
          &lt;wtpversion&gt;2.0&lt;/wtpversion&gt;
          &lt;additionalBuildcommands&gt;
              &lt;buildCommand&gt;
                  &lt;name&gt;org.eclipse.ajdt.core.ajbuilder&lt;/name&gt;
                  &lt;arguments&gt;
                      &lt;aspectPath&gt;org.springframework.aspects&lt;/aspectPath&gt;
                  &lt;/arguments&gt;
              &lt;/buildCommand&gt;
              &lt;buildCommand&gt;
                  &lt;name&gt;org.springframework.ide.eclipse.core.springbuilder&lt;/name&gt;
              &lt;/buildCommand&gt;
          &lt;/additionalBuildcommands&gt;
          &lt;additionalProjectnatures&gt;
              &lt;projectnature&gt;org.eclipse.ajdt.ui.ajnature&lt;/projectnature&gt;
              &lt;projectnature&gt;org.springframework.ide.eclipse.core.springnature&lt;/projectnature&gt;
              &lt;projectnature&gt;com.atlassw.tools.eclipse.checkstyle.CheckstyleNature&lt;/projectnature&gt;
          &lt;/additionalProjectnatures&gt;
          &lt;additionalConfig&gt;
              &lt;file&gt;
                  &lt;name&gt;.checkstyle&lt;/name&gt;
                  &lt;content&gt;
  &lt;![CDATA[
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false"&gt;
    &lt;fileset name="all" enabled="true" check-config-name="My Checkstyle rules" local="false"&gt;
      &lt;file-match-pattern match-pattern="." include-pattern="true"/&gt;
    &lt;/fileset&gt;
    &lt;filter name="FilesFromPackage" enabled="true"&gt;
      &lt;filter-data value="target" /&gt;
      &lt;filter-data value="src/main/resources"/&gt;
      &lt;filter-data value="src/test/java"/&gt;
      &lt;filter-data value="src/test/resources"/&gt;
      &lt;filter-data value="src/main/webapp" /&gt;
    &lt;/filter&gt;
  &lt;/fileset-config&gt;
  ]]&gt;
                  &lt;/content&gt;
              &lt;/file&gt;
          &lt;/additionalConfig&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Module pom - plugins section:</p>
  
  <pre><code>&lt;plugin&gt;
       &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
       &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
  &lt;/plugin&gt;
  </code></pre>