Maven – PMD example

In this article, we will show you how to use Maven PMD Plugin to analyze the Java code. P.S PMD requires Java 1.7 1. Maven PMD Plugin Define the maven-pmd-plugin in the reporting tag, so that mvn site will generate the PMD report. pom.xml <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>3.11.0</version> </plugin> </plugins> </reporting> 2. Java …

Read more