Scenario:
I have a JUnit test with SysOut calls. I want to suppress these calls when maven is executing in order to reduce clutter on the screen. However, I'd still like it to print out when run through Eclipse.
Is there a way to check programmatically if the Maven is the one executing the JUnit test?
Pseudo-code:
if (!isCalledByMaven()) {
System.out.println("Bob is not here.");
}