Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

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

Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
 
comments powered by Disqus
Other posts you may like...