If you use version 3.0 of maven-compiler-plugin it should give you better info if you use JDK 1.6+. You need to pin down the version of the plugin in the pom.
/Anders On Mon, Feb 18, 2013 at 11:18 PM, Paul Bourke <[email protected]> wrote: > Hi, > > I'm having trouble where Maven is not showing compiler errors as one > would expect. > > Take the following: > > ``` > # Create a basic 'hello world' project > $ mvn archetype:generate -DgroupId=com.mycompany.app > -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart > -DinteractiveMode=false > > $ cd my-app/ > > # Add a syntax error > $ sed -i 's/println/printl/g' src/main/java/com/mycompany/app/App.java > > # Try to compile > $ mvn package > ``` > > I get the following: > > ... > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile > (default-compile) on project my-app: Compilation failure > [ERROR] > /home/bourke/tmp/my-app/src/main/java/com/mycompany/app/App.java:[11,18] > error: cannot find symbol > [ERROR] -> [Help 1] > ... > > It doesn't show me what symbol is wrong. Compare with the default javac > output: > > $ javac src/main/java/com/mycompany/app/App.java > src/main/java/com/mycompany/app/App.java:11: error: cannot find symbol > System.out.printl( "Hello World!" ); > ^ > symbol: method printl(String) > location: variable out of type PrintStream > 1 error > > Obviously much more useful. > > Any help much appreciated. > -Paul > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
