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

Compatibility with merged JDK 9 mainline [SPR-13344] #17928

Closed
spring-projects-issues opened this issue Aug 12, 2015 · 4 comments
Closed

Compatibility with merged JDK 9 mainline [SPR-13344] #17928

spring-projects-issues opened this issue Aug 12, 2015 · 4 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 12, 2015

Juergen Hoeller opened SPR-13344 and commented

As of 4.2.1, the core Spring Framework is fully compatible with mid-2015 JDK 9 builds already, at runtime as well as for running the framework build.

For 4.3, we aim for full runtime compatibility with the merged JDK 9 mainline, including the current state of the Jigsaw module system which has been developed in a parallel branch for a long time. Note that this not include any actual support for JDK 9 modules yet; this remains a Spring 5 topic.


Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Mar 25, 2016

Juergen Hoeller commented

Gradle doesn't build on JDK 9 build 111, not finding javac for the compile tasks. I'm afraid we'll have to wait for an upcoming Gradle release to address this... which might take a while :-(

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Apr 13, 2016

Juergen Hoeller commented

Since our remaining timeframe does not allow for proper JDK 9 b111+ setup in Spring Framework 4.3 RC2 anymore, let's rather move this to the 5.0 timeline. I've dropped our previous - now outdated - JDK 9 build support from build.gradle for the time being, both in 4.3 RC2 and in 4.2.6, in particular restoring standard use of AspectJ 1.8.9 over AspectJ 1.9 beta 3 (which is actually older than 1.8.9).

It is still a goal for the Spring Framework 4.3 line to be compatible with JDK 9 in general. We might cover this with integration tests from now on though, not attempting to make that framework generation buildable on JDK 9 anymore. At the same time, we still intend to build Spring Framework 5.0 on JDK 9 (#17778), although even that might not happen before the later milestone phase (~M3).

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jun 15, 2016

Sam Brannen commented

FYI: see my related comments in #17778 regarding building with JDK 9 EA and Gradle 3.0 nightly builds.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jul 27, 2016

Juergen Hoeller commented

As of 5.0 M1, with AspectJ upgraded to 1.9 beta 5 and our build script revised to explicitly list dependencies beyond the java.base mode, the codebase and the setup is fundamentally compatible with current JDK 9 builds. This is not just about runtime compatibility, it is about the build executing on JDK 9, and all tests passing (with the notable exception of our JRuby integration test for web script templating).

At the moment, beyond pointing JAVA_HOME to a JDK 9 installation, one needs to do gradlew wrapper --gradle-version 3.0-milestone-2 first since Gradle 2.14 is not able to find the Java compiler on JDK 9 otherwise. Then just do gradlew clean test for a standard run. Once Gradle 3.0 is generally available (expected later this year), we'll upgrade to it by default; at that point it'll literally remain a switch in JAVA_HOME.

For more advanced efforts, consider changing sourceCompatibility and targetCompatibility to 1.9 in our build.gradle script. Compilation also passes but - as per 5.0 M1 - AspectJ and EclipseLink tests are going to fail at runtime. Note that we do not intend to actually switch our build to 1.9 bytecode level in the 5.0 generation, not even for the tests; we might upgrade the latter for 5.1 eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants