Generating code quality reports for a site

We have seen how to use various code quality tools to perform static code analysis. Let us now see how we can update our site documentation with reports from these tools.

How to do it...

Use the following steps to generate code quality reports for a site:

  1. Open the project for which we want to generate the site report.
  2. Add the following code to the reporting section of the pom.xml file:
     <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>3.3</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.13</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> ...

Get Apache Maven Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.