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

Does not fail build on jdk8 #224

Closed
cushon opened this issue Oct 31, 2014 · 5 comments
Closed

Does not fail build on jdk8 #224

cushon opened this issue Oct 31, 2014 · 5 comments

Comments

@cushon
Copy link
Collaborator

cushon commented Oct 31, 2014

Original issue created by kristian.rosenvold on 2014-01-03 at 06:39 PM


We have a test case for the maven-compiler plugin that does not fail the build when running with java8.

The enclosed project fails perfectly when using jdk7, but succeds on java8. Running the project itself is a bit complex (plexus-compiler branch MCOMPILER217 and maven-compiler-plugin needs to be built from source), but I assume you're able to construct a test case for this pretty easily within your own source tree.

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by eaftan@google.com on 2014-01-29 at 10:14 PM


Liam is working on Java 8 compatibility for error-prone. We're still hammering out how we want it to work. The javac API changes make it kind of hairy.


Status: Started
Owner: cushon@google.com

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by eaftan@google.com on 2014-03-04 at 01:00 AM


Liam has completed the work for javac8. He'll try to reproduce and make sure it's fixed.

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by prateekjainaa on 2014-07-26 at 07:32 AM


which exact version of java8 work fine with maven compiler plugin?

@cushon
Copy link
Collaborator Author

cushon commented Oct 31, 2014

Original comment posted by cushon@google.com on 2014-07-29 at 05:32 PM


Error-prone builds with jdk8, but versions built with jdk8 aren't compatible at runtime with jdk7. We haven't decided what the best way to distribute the jdk8 compatible version is. Options include a separate maven artifact for jdk8, or bundling the jdk7 and jdk8 versions together and loading the right one at runtime.

It's possible to experiment with error-prone and java 8 now if you don't mind building it yourself. You'll need to:

  1. grab a copy of error-prone and https://github.com/sonatype/plexus-compiler

  2. install a local copy of error-prone built with java 8:
    $ cd error-prone
    $ export JAVA_HOME=<your JDK8 home> && mvn clean install

  3. Install a local copy of the plexus-compiler plugin, but with error-prone 8. First, update plexus-compilers/plexus-compiler-javac-errorprone/pom.xml to use the version of error-prone you just built, currently 1.1.3-SNAPSHOT. Then build and install the plugin.

  4. Update the project using error-prone to use the versions of plexus-compiler and error-prone that you just built, set JAVA_HOME to jdk8, and build your project.

@cushon
Copy link
Collaborator Author

cushon commented Jan 23, 2015

Duplicate of #246

@cushon cushon closed this as completed Jan 23, 2015
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

1 participant