Juergen Hoeller opened SPR-13186 and commented

Resources


Issue Links: - #17928 Compatibility with merged JDK 9 mainline ("depends on") - #19138 Upgrade build to Gradle 3.0 ("depends on") - #18092 Remove AbstractJpaTests and revise spring-orm test suite accordingly ("depends on") - #18079 Declare Spring modules with JDK 9 module metadata ("is depended on by") - #17779 Support for new JDK 9 HTTP Client API ("is depended on by")

2 votes, 12 watchers

Comment From: spring-projects-issues

Sam Brannen commented

Hi Juergen Hoeller,

I've got some good news...

If you remove the -Werror flag from compileJava.options*.compilerArgs in build.gradle, it is once again possible to start smoke testing against OpenJDK 9 Early Access builds using Gradle 3.0 nightly builds.

$> gradlew wrapper --gradle-distribution-url=https://services.gradle.org/distributions-snapshots/gradle-3.0-20160615000025+0000-bin.zip
$> gradlew -version
$> gradlew clean test

Of course, lots of things don't work, such as: JAXB, XmlBeans, AspectJ, JRuby, our shadow ClassLoader for JPA tests, etc.

As an experiment, however, I was able to get the JAXB support in Spring OXM to compile by declaring the following dependencies in spring-oxm/oxm.gradle.

xjc 'javax.xml.bind:jaxb-api:2.2.11'
xjc 'com.sun.xml.bind:jaxb-core:2.2.11'
xjc 'com.sun.xml.bind:jaxb-impl:2.2.11'
xjc 'com.sun.xml.bind:jaxb-xjc:2.2.11'
xjc 'javax.activation:activation:1.1.1'

So.... happy testing! ;)

p.s., I read elsewhere that the preferred way to reference the current JAXB dependencies (without referencing com.sun.*) is as follows:

  • org.glassfish.jaxb:jaxb-xjc:2.2.11
  • org.glassfish.jaxb:jaxb-runtime:2.2.11

Comment From: spring-projects-issues

Juergen Hoeller commented

For the time being, we're going to stay on a JDK 8 build. Technically we only have a need to build on JDK 9 once we decide to ship module-info descriptors, and it looks like we'll be able to live with Automatic-Module-Name entries (#18289) up until Spring Framework 6.

Comment From: spring-projects-issues

Rostislav Krasny commented

Juergen Hoeller, I think the minimum JDK version for Spring Framework 6 building should be JDK 11 because this is the first Long Term Support (LTS) version of JDK after JDK 8. JDK 9 and JDK 10 had very short term support and are already dead, i.e. they are unsupported by Oracle. I think the title of this Jira ticket should be updated accordingly.

Comment From: spring-projects-issues

Juergen Hoeller commented

Good point, once we upgrade the Java baseline for Spring Framework 6, we'll certainly aim for JDK 11+ right away. However, from where we stand right now, this is unlikely to happen before 2021 (when JDK 17 is on the horizon as the next LTS release, providing us with a target support range of two LTS generations of Java again).

Comment From: jhoeller

Repurposing this issue for our JDK 17 baseline in Spring Framewor 6.0, the basics have been covered by a few recent commits already, e.g. through #26901.

Comment From: jhoeller

Closing this issue for 6.0 M1 since all the basic upgrade is complete. Further steps towards the Java module system are planned for a later milestone, e.g. #18079.