Skip to content


PMD is a static source code analyzer that can be highly configured to detect issues on a wide range, from poor coding, missing documentation to severe security or performance flaws.

PMD can also be added to IntelliJ as graphical plugin.


Add the following plugin to your pom.xml:

<!-- PMD static code analysis -->
        <!-- full list: bestpractices, codestyle, design, documentation, errorprone, multithreading, performance-->
        <!-- failOnViolation is actually true by default, but can be disabled -->
        <!-- printFailingErrors is pretty useful -->
        <!-- Enforce the pmd:check goal is auto-executed during package phase-->


  • The plugin is configured to be automcatically executed on every mvn clean package.
  • To run the code analysis without the full package phase, type: mvn clean pmd:check.


Above default configuration only tests for codestyle violations. To get the full range of feedback, enable the full rulesets list: