jaxrs-analyzer-maven-plugin icon indicating copy to clipboard operation
jaxrs-analyzer-maven-plugin copied to clipboard

Mulit module project using plugin results in "unknown compilation problem"

Open geziefer opened this issue 6 years ago • 0 comments

Hi Sebastian, I used your plugin for one of my modules implementing a REST service. When converting it into a maven multi module project, with the following structure:

root-folder: containing parent pom, defining 1.8 for build and group/version, listing sub1, sub2, sub3 as modules
sub1: first module (jar), refering to parent pom
sub2: second module (jar), refering to parent pom, having the jaxrs-analyzer-plugin, sub1 as dependency
sub3: third module (jar), refering to parent pom, sub2 as dependency

it resultet in a strange problem within the javac tool when building it from the paren pom:

An exception has occurred in the compiler (1.8.0_181). Please file a bug against the Java compiler via the Java bug reporting page [..]
java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.tree.JCTree$1 from class com.sun.tools.javac.tree.JCTree$JCLiteral
        at com.sun.tools.javac.tree.JCTree$JCLiteral.getValue(JCTree.java:2044)
        at com.sun.tools.javac.parser.JavacParser.merge(JavacParser.java:1034)
[..]

But everything works fine when only building the module itself.

Some discussion on StackOverflow (https://stackoverflow.com/questions/51731485/strange-compiler-behaviour-in-multi-module-project/) lead to the assumption that the bytecode analysis of your plugin somehow pollutes the JVM and thus causes the following module to break in the build. When isolating the compiler as suggested in the answer, it also works when building from the parent.

Is this a general problem or a bug within the plugin?

Regards, Alex

geziefer avatar Aug 08 '18 10:08 geziefer