[ https://jira.codehaus.org/browse/MCOMPILER-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335747#comment-335747 ]
Leonid Ilyevsky commented on MCOMPILER-158: ------------------------------------------- I see this problem is fixed in the plugin version 3.1. > Symbol name should be displayed during compiler error using Java 7 > ------------------------------------------------------------------ > > Key: MCOMPILER-158 > URL: https://jira.codehaus.org/browse/MCOMPILER-158 > Project: Maven Compiler Plugin > Issue Type: Improvement > Affects Versions: 2.3.2 > Reporter: Raghuram > > Got to install Java 7. Tried it out on some of our source code which uses > maven. Worked fine till there was a compilation error. > {code} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile > (default-compile) on project my-app: Compilation failure > [ERROR] \work\my-app\src\main\java\com\mycompany\app\App.java:[11,45] error: > cannot find symbol > [ERROR] -> [Help 1] > {code} > I am ok with the error, but which _symbol_ does it fail to find? Tried the > same thing with Java 6. > {code} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile > (default-compile) on project my-app: Compilation failure > [ERROR] \work\my-app\src\main\java\com\mycompany\app\App.java:[11,45] cannot > find symbol > [ERROR] symbol : variable Dummy > [ERROR] location: class com.mycompany.app.App > [ERROR] -> [Help 1] > {code} > I can clearly see which variable is not found. So what has changed? > Tried *javac* on the class. Output with java 7. > {code} > javac App.java > App.java:11: error: cannot find symbol > System.out.println( "Hello World!" + Dummy); > ^ > symbol: variable Dummy > location: class App > 1 error > {code} > Output with java 6. > {code} > javac App.java > App.java:11: cannot find symbol > symbol : variable Dummy > location: class com.mycompany.app.App > System.out.println( "Hello World!" + Dummy); > ^ > 1 error > {code} > We can see a couple of differences with Java 7 compiler compared to Java 6. > * Location does not show complete package, just the class > * Symbol and location now come after the line which has the error, instead of > before. > * An additional "error" word comes before the error message > Essentially there is a change in compiler output in case of errors, which I > guess needs a corresponding maven compiler change. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira