I'm currently learning how to use Maven to build projects that I write in Java. Before, I've only used javac
to compile my projects and I've gotten used to the error messages produced by it. I tried to compile the following erroneous, test program using mvn compile
and then javac
manually:
public class App {
public static void main( String[] args )
{
System.out.print(a);
}
}
javac
produces:
App.java:5: error: cannot find symbol
System.out.print(a);
^
symbol: variable a
location: class App
1 error
but mvn compile
produces this (among a bunch of other stacktraces and output):
...
[ERROR] /home/htor/maven-test/cflat/src/main/java/no/uio/ifi/cflat/App.java:[5,25] error: cannot find symbol
[ERROR] -> [Help 1]
...
The latter is not as useful as the first error message and it doesn't contain the full error message from javac
. I've tried using -e
and -X
but the error is reported identically, just with more noice around.
How can I get the full Javac error message in the error messages from Maven?