maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Glick (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MCOMPILER-158) Symbol name should be displayed during compiler error using Java 7
Date Fri, 26 Aug 2011 16:33:32 GMT

    [ https://jira.codehaus.org/browse/MCOMPILER-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277163#comment-277163
] 

Jesse Glick commented on MCOMPILER-158:
---------------------------------------

MCOMPILER-144 (using JSR 199) is the proper fix for this class of issue.

> Symbol name should be displayed during compiler error using Java 7
> ------------------------------------------------------------------
>
>                 Key: MCOMPILER-158
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-158
>             Project: Maven 2.x 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message