Skip to content

Instantly share code, notes, and snippets.

@ShaneLee
Last active March 5, 2022 16:13
Show Gist options
  • Save ShaneLee/782faa0ab39c2b0ffdf1eac2476f2427 to your computer and use it in GitHub Desktop.
Save ShaneLee/782faa0ab39c2b0ffdf1eac2476f2427 to your computer and use it in GitHub Desktop.
Maven checkstyle
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle-maven-plugin.version}</version>
<configuration>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
<configLocation>checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle-maven-plugin.version}</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment