Controlling the verbosity of the Maven output

Sometimes, the output from Maven might be too verbose and we may want to only see the errors. At other times, the information displayed by Maven may be insufficient and we want to see more details. Let us see how we can control this.

How to do it...

  1. Open a Maven project.
  2. Run the following command:
        mvn –q clean package 
    
  3. Observe the output:
    How to do it...
  4. Now run the following command:
        mvn –X clean package 
    
  5. Observe the output:
    How to do it...

How it works...

Maven provides different levels of logging. The typical levels are DEBUG (detailed ...

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.