When investigating complex issues with Maven or command-line tools, it is often helpful to capture the output to a file for further analysis.
This tip shows how to capture both βstdoutβ and βstderrβ to capture a complete authoritative output.
mvn test >testlog.txt 2>&1
Original credit to Anders Lindahl on StackOverflow.