Add PMD rules into your project
pom.xml <properties> <pmd.failOnViolation>true</pmd.failOnViolation> </properties> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>3.1</version> <executions> <execution> <id>pmd</id> <phase>verify</phase> ...