Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warnings, when building project with maven dependency to antlr-3.5.jar #126

Closed
SierraGolf opened this issue Sep 16, 2013 · 5 comments

Comments

@SierraGolf
Copy link

We have a dependency to the antlr project in version 3.5, which has a dependency to antlr-2.7.7.jar. When building the project we receive this warning:

[INFO] warning: Ignoring InnerClasses attribute for an anonymous inner class
[INFO] (antlr.build.ANTLR$1) that doesn't come with an
[INFO] associated EnclosingMethod attribute. This class was probably produced by a
[INFO] compiler that did not target the modern .class file format. The recommended
[INFO] solution is to recompile the class from source, using an up-to-date compiler
[INFO] and without specifying any "-target" type options. The consequence of ignoring
[INFO] this warning is that reflective operations on this class will incorrectly
[INFO] indicate that it is *not* an inner class.
[INFO] warning: Ignoring InnerClasses attribute for an anonymous inner class
[INFO] (antlr.debug.misc.ASTFrame$1) that doesn't come with an
[INFO] associated EnclosingMethod attribute. This class was probably produced by a
[INFO] compiler that did not target the modern .class file format. The recommended
[INFO] solution is to recompile the class from source, using an up-to-date compiler
[INFO] and without specifying any "-target" type options. The consequence of ignoring
[INFO] this warning is that reflective operations on this class will incorrectly
[INFO] indicate that it is *not* an inner class.
[INFO] warning: Ignoring InnerClasses attribute for an anonymous inner class
[INFO] (antlr.TokenStreamRewriteEngine$1) that doesn't come with an
[INFO] associated EnclosingMethod attribute. This class was probably produced by a
[INFO] compiler that did not target the modern .class file format. The recommended
[INFO] solution is to recompile the class from source, using an up-to-date compiler
[INFO] and without specifying any "-target" type options. The consequence of ignoring
[INFO] this warning is that reflective operations on this class will incorrectly
[INFO] indicate that it is *not* an inner class.

It seems that the antlr-2.7.7.jar was build with an very old compiler. Is there a way to get rid of this warning?

@sharwell
Copy link
Member

What is your specific dependency in your pom file?

I doubt there is anything that can be done about this.

@SierraGolf
Copy link
Author

<dependency>
    <groupId>org.antlr</groupId>
    <artifactId>antlr</artifactId>
    <version>3.5</version>
</dependency>

@sharwell
Copy link
Member

I'll mark the StringTemplate 3 dependency as <optional>true</optional> for the next release, which will transitively apply to the ANTLR 2 dependency.

@ghost ghost assigned sharwell Sep 16, 2013
@SierraGolf
Copy link
Author

Thanks, any estimates when this will be?

@sharwell
Copy link
Member

Not yet. I've been meaning to release an update to this and ANTLRWorks 1.5 to address some minor bugs, but we haven't scheduled a release date yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants