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

Java 9 Maven Compiling Issue #1482

Closed
lalib opened this issue Oct 3, 2017 · 2 comments
Closed

Java 9 Maven Compiling Issue #1482

lalib opened this issue Oct 3, 2017 · 2 comments

Comments

@lalib
Copy link

lalib commented Oct 3, 2017

Hi there,

I am getting an error compiling the project with maven. Here are the logs;

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by lombok.javac.apt.LombokProcessor to field com.sun.tools.javac.processing.JavacProcessingEnvironment.processorClassLoader
WARNING: Please consider reporting this to the maintainers of lombok.javac.apt.LombokProcessor
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.036 s
[INFO] Finished at: 2017-10-03T21:34:58+02:00
[INFO] Final Memory: 38M/127M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project X: Fatal error compiling: java.lang.NoClassDefFoundError: com/sun/tools/javac/file/BaseFileObject: com.sun.tools.javac.file.BaseFileObject -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Java version : 9
Lombok version: 1.16.18
Maven version: 3.5.0
Maven compiler plugin version: 3.1

Can you help me please?

@lalib lalib changed the title Java 9 Maven Compling Issue Java 9 Maven Compiling Issue Oct 3, 2017
@rspilker
Copy link
Collaborator

rspilker commented Oct 5, 2017

The solution is to add some -J--add-opens arguments to the compiler, however, that won't help you for now because of a bug in the compiler-plugin. Please vote for issue MCOMPILER-291 to get this fixed.

One other thing, it did compile on my machine, but possibly I just didn't fail on warnings.

@rspilker
Copy link
Collaborator

rspilker commented Oct 5, 2017

Duplicate of #1471

@rspilker rspilker marked this as a duplicate of #1471 Oct 5, 2017
@rspilker rspilker closed this as completed Oct 5, 2017
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