Maven, don't swallow the stacktraces from failing JUnit tests!

If you've got a test like this:

public void canSayFoo() throws Exception {
  // some code that throws an exception

then mvn will just print the exception on one line, stating the line in the unit tests and not the line where the error originated. I find it strange that this has become the default behaviour of the sure fire plugin. Fortunately, you can get the stack traces back by passing this parameter:


or configuring the surefire plugin in your pom.xml:


Licensed under CC BY Creative Commons License ~ ✉ torstein.k.johansen @ gmail ~ 🐘 ~ 🐦 @torsteinkrause