Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Apache Maven Cookbook
  • Toc
  • feedback
Apache Maven Cookbook

Apache Maven Cookbook

By : Raghuram Bharathan
4.2 (5)
close
Apache Maven Cookbook

Apache Maven Cookbook

4.2 (5)
By: Raghuram Bharathan

Overview of this book

If you are a Java developer or a manager who has experience with Apache Maven and want to extend your knowledge, then this is the ideal book for you. Apache Maven Cookbook is for those who want to learn how Apache Maven can be used for build automation. It is also meant for those familiar with Apache Maven, but want to understand the finer nuances of Maven and solve specific problems.
Table of Contents (13 chapters)
close
12
Index

Analyzing code with the Maven Checkstyle plugin


Checkstyle is a tool that helps programmers follow coding standards. It automates the process of checking if defined coding standards are followed. It can support any coding standards by suitable configuration. Like other tools, it can be run standalone as well as integrated with Maven.

How to do it...

Use the following steps to analyze code with the Maven Checkstyle plugin:

  1. Open the Maven project for which you want to do a Checkstyle analysis (for instance, project-with-violations).

  2. Run the following command:

    mvn checkstyle:checkstyle
    
  3. Observe the output as shown in the following screenshot:

    [INFO]
    [INFO] --- maven-checkstyle-plugin:2.13:checkstyle (default-cli) @ project-with-violations ---
    [INFO]
    [INFO] There are 29 checkstyle errors.
    [WARNING] Unable to locate Source XRef to link to - DISABLED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    
  4. Open the checkstyle-result.xml report in the target...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete