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

Re-compile fails with maven-compiler-plugin 3.2 or 3.3 #7

Open
cristcost opened this issue Sep 10, 2015 · 1 comment
Open

Re-compile fails with maven-compiler-plugin 3.2 or 3.3 #7

cristcost opened this issue Sep 10, 2015 · 1 comment

Comments

@cristcost
Copy link
Member

If the maven build of an annotated project is performed without a clean, the build fails if using maven-compiler-plugin 3.2 or 3.3.

The problem depends on the incremental compilation, and recompiling triggers an exception on the JDK's javac:

An exception has occurred in the compiler (1.8.0_25). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
java.lang.IllegalStateException: endPosTable already set
    at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable(DiagnosticSource.java:136)
    ...

Currently the problem can be worked around by excluding incremental compilation in the target project's pom.xml adding the following configuration for the compiler plugin:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <useIncrementalCompilation>false</useIncrementalCompilation>
    </configuration>
</plugin>
@tbroyer
Copy link

tbroyer commented Sep 14, 2015

This is a Maven issue: https://issues.apache.org/jira/browse/MCOMPILER-236
I haven't investigated but it could be a duplicate of https://issues.apache.org/jira/browse/MCOMPILER-235 (where javac behavior is different between Java 7 –which errors out– and Java 8 –which crashes–)
Both due to https://issues.apache.org/jira/browse/MCOMPILER-157

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