Upgrading Checkstyle at Runtime

Maven Checkstyle plugin comes with a default Checkstyle version: for maven-checkstyle-plugin 2.17, Checkstyle 6.11.2 is used by default.

Given Checkstyle generally keeps good compatibility between versions, you can override the version used at runtime to benefit from Checkstyle latest bugfixes:

<project>
  ...
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>...choose your version...</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  <build>
  ...
</project>