Maven: Reducing test output

April 7, 2012

One of the things that can be quite annoying is the huge amount of output on the console when you are running maven tests. I have been using Gradle in the past, and out of the box you don’t need to look at all this junk.

Luckily I discovered today that it also is possible in Maven:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-surefire-plugin</artifactId>
   <version>2.12</version>
   <configuration>                   
       <redirectTestOutputToFile>true</redirectTestOutputToFile>
   </configuration>
</plugin>

So the thing that needs to be set is the redirectTestOutputToFile property and no more noise on the screen.