Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.
Notice: I'm taking a break from blogging to focus on Atari Gamer . com, check it out!

The Maven Surefire Plugin disables full stack trace display by default when running tests. Sometimes it is useful to see the full stack trace however, here's how you enable it.
mvn_junit1.png


As per documentations, use the trimStackTrace parameter and set it to false. Your plugin configuration for Surefire will then be something like this...
 pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>


That's all you have to do. Next time you run tests and get an exception, the full expanded goodness or the entire stack trace will be bestowed upon you.



-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. If you spot something out of place, please do let me know.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.