title: Maven plugin for auto formatting code to match google checkstyle?
body: <p>I'm using the google checkstyle in Intellij: <a href="https://github.com/google/styleguide" rel="nofollow noreferrer">https://github.com/google/styleguide</a></p>
  
  <p>I have this eclipse checkstyle run when I format during any coding in IntelliJ and it seems to work fine. I want to have a Maven phase that formats the code whenever I run <code>mvn clean install</code>.</p>
  
  <p>I'm using the following plugin: </p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;net.revelc.code.formatter&lt;/groupId&gt;
      &lt;artifactId&gt;formatter-maven-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;goals&gt;
                  &lt;goal&gt;format&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;configFile&gt;src/main/resources/eclipse-java-google-style.xml&lt;/configFile&gt;
                  &lt;encoding&gt;UTF-8&lt;/encoding&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Unfortunately, it doesn't seem to be registering that config file properly. I'm wondering what the best rule of thumb is for grabbing the proper checkstyle config. Where to I put it and how do I represent it in my POM?</p>