Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

More than 5 years have passed since last update.

Spring Bootの依存関係管理のJava 10サポート状況

Last updated at Posted at 2018-07-04

概要

Spring Bootの依存関係管理([Spring Boot 2.0.3.RELEASE Appendix F. Dependency versions] (https://docs.spring.io/spring-boot/docs/2.0.3.RELEASE/reference/htmlsingle/#appendix-dependency-versions))に含まれるライブラリ、フレームワーク等のサポート状況です。Spring Boot 2.0.1からJava 10をサポートしているので、依存関係管理に含まれるライブラリ、フレームワークもJava 10で動作すると思いますが、それぞれのサイトでJava 10のサポートが明文化されているか、制約があるか、動作に必要な最低バージョンなどを確認しています。

  • Spring Bootでは、依存関係管理で指定しているバージョンを変えないことを推奨しています(lombokは例外としてwikiに補足があります)。
  • 確認する範囲が広いのでごく簡単にざっくりした感じで調べています。また一度に調べ切れないので逐次更新していく予定です。

バイトコード操作

ASM (7.0 beta - )

[FAQ] (https://asm.ow2.io/faq.html#Q14)

14. What is the earliest JDK required to use ASM?

ASM requires a JDK 1.5 or above.

[Versions] (https://asm.ow2.io/versions.html)

24 May 2018: ASM 6.2 (tag ASM_6_2)

experimental support for the upcoming JDK 11 features (nest mates and ConstantDynamic)

11 March 2018: ASM 6.1 (tag ASM_6_1)

new V10 constant for Java 10 class files

12 October 2013: ASM 5.0 beta (tag ASM_5_0_BETA)

Full support of Java 8 (annotation on Java types and MethodParameters attribute)

:grey_question: Java 9をサポートするバージョンは ASM 6.0+ という情報あり。

[eclipse/jetty.project / Upgrade to ASM Version 6.0 for JDK9] (https://github.com/eclipse/jetty.project/issues/1213)

ASM 7.0 betaでJDK 11を正式サポート

29 September 2018: ASM 7.0 beta (tag ASM_7_0_BETA)

  • support of JDK 11 features now official (was experimental)

Byte Buddy (1.9.0 - )

[License and development] (https://github.com/raphw/byte-buddy#license-and-development)

On these commands, Byte Buddy is cloned from GitHub and built on your machine. Byte Buddy is currently tested for versions 6 to 10 of the JDK on CI servers.

  • Mockitoが依存

1.9.0でJDK 11を正式サポート

[Byte Buddy 1.9.0] (https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.9.0)

Update to ASM 7 for non-experimental Java 11 support.

Spring Boot 2.1

Upgrade to Byte Buddy 1.8.12
Upgrade to Byte Buddy 1.8.13

lombok

[changelog] (https://projectlombok.org/changelog)

v1.16.22 "Envious Ferret" (May 29th, 2018)

  • PLATFORM: Lombok can be compiled on JDK10, and should run on JDK10. Issue #1693
  • PLATFORM: Fix for using lombok together with JDK9+'s new module-info.java feature. Issue #985

v1.16.20 (January 9th, 2018)

  • PLATFORM: Better support for jdk9 in the new IntelliJ, Netbeans and for Gradle.

Spring Boot 2.1

Upgrade to Lombok 1.18.0

AOP

AspectJ

[AspectJ 1.9.1 Readme] (https://www.eclipse.org/aspectj/doc/released/README-191.html)

Java 10 support

AspectJ has updated to a recent JDT compiler version (commit #abe06abe4ce1 - 9-Apr-2018). With this update it now supports Java10. This means you can use the 'var' support.

Spring Boot 2.1

Upgrade to AspectJ 1.9.0
Upgrade to Aspectj 1.9.1

シリアライズ / デシリアライズ ライブラリ

Jackson

[Jackson Release 2.9] (https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9)

JDK

No changes from 2.8: Java 7 features available for all modules (meaning, need to compile on Java 7)

[Jackson Release 3.0] (https://github.com/FasterXML/jackson/wiki/Jackson-Release-3.0)

JDK

Java 8 is now required for all components.

GSON

[Change Log] (https://github.com/google/gson/blob/master/CHANGELOG.md)

Version 2.8.5

Fixed issue https://github.com/google/gson/issues/1310 by supporting Debian Java 9

データベース関連

Hibernate ORM

[Getting started with Hibernate ORM] (http://hibernate.org/orm/documentation/getting-started/)

Hibernate 5.2 and later versions require at least Java 1.8 and JDBC 4.2.
Hibernate 5.1 and older versions require at least Java 1.6 and JDBC 4.0.

Hibernate 5.3

[Hibernate ORM 5.3.3.Final released] (http://in.relation.to/2018/07/24/hibernate-orm-533-final-out/)

JDK 11 support

We made quite a lot of build changes to support running our tests with the latest build of JDK 11.
They are now run on our CI on a daily basis so we should be ready when JDK 11 gets released.

Spring FrameworkがHibernate 5.3をサポートするのはバージョン5.1.RC1の対応予定です。

[Support for Hibernate ORM 5.3] (https://jira.spring.io/projects/SPR/issues/SPR-16303?filter=allopenissues)

Spring Boot 2.1

Support Hibernate 5.3.0 / JPA 2.2 (JDK8 Streams for pagination)
Upgrade to Hibernate 5.3.3.Final

JOOQ

[jOOQ 3.11 Released With 4 New Databases, Implicit Joins, Diagnostics, and Much More] (https://blog.jooq.org/2018/06/07/jooq-3-11-released-with-4-new-databases-implicit-joins-diagnostics-and-much-more/)

Formal Java 10 Support

jOOQ 3.11 is the first release that is formally integration tested with Java 10.
To use jOOQ with Java 10, use the Java 8 distribution which has not yet been
modularised, but contains Automatic-Module-Name specification to be forward
compatible with future, modularised jOOQ distributions.

Java 11

3.12.0で対応予定

[Add support for Java 11] (https://github.com/jOOQ/jOOQ/issues/7595)

Spring Boot 2.1

Upgrade to Jooq 3.11.2
Upgrade to Jooq 3.11.3

MySQL Connector/J

[Chapter 2 Connector/J Versions, and the MySQL and Java Versions They Support] (https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-versions.html)

Table 2.1 Summary of Connector/J Versions

Connector/J version JDBC version MySQL Server version JRE Supported JDK Required for Compilation Status
8.0 4.2 5.5, 5.6, 5.7, 8.0 1.8.x 1.8.x General Availability
5.1 3.0, 4.0, 4.1, 4.2 5.5, 5.6*, 5.7*, 8.0* 1.5.x, 1.6.x, 1.7.x, 1.8.x* 1.5.x and 1.8.x General Availability
  • JRE 1.8.x is required for Connector/J 5.1 to connect to MySQL 5.6, 5.7, and 8.0 with SSL/TLS when using some cipher suites.

MySQL Forums

[Re: Does MySQL work with Java 10 and XQuery] (https://forums.mysql.com/read.php?39,666863,666870#msg-666870)

You can use MySQL with Java 10. Just take the latest Connector/J driver and use it in you Java project (https://dev.mysql.com/downloads/connector/j/).

Spring Boot 2.1

Upgrade to Mysql 8.0.11

MariaDB Connector/J

[About MariaDB Connector/J] (https://mariadb.com/kb/en/library/about-mariadb-connector-j/)

Requirements

MariaDB Connector/J 1.7.x version is now the maintenance version for Java 6 and Java 7.

|Driver version| Java version|
|:-----|:-----|
|2.x |Java 9, Java 8|
|> 1.6.1 - < 2| Java 9, Java 8, Java 7, Java 6|
|1.2 - 1.6.1| Java 8, Java 7|
|1.1 |Java 8, Java 7, Java 6|

PostgreSQL JDBC Driver

[PostgreSQL JDBC Download] (https://jdbc.postgresql.org/download.html)

Current Version 42.2.2

  • If you are using Java 8 or newer then you should use the JDBC 4.2 version.
  • If you are using Java 7 then you should use the JDBC 4.1 version.
  • If you are using Java 6 then you should use the JDBC 4.0 version.
  • If you are using a Java version older than 6 then you will need to use a JDBC3 version of the driver, which will by necessity not be current, found in Other Versions.

HikariCP

[brettwooldridge/HikariCP] (https://github.com/brettwooldridge/HikariCP)

Requirements

⇒ Java 8+ (Java 6/7 artifacts are in maintenance mode)
⇒ slf4j library

Java 8/9 maven artifact

<dependency>
    <groupId>com.zaxxer</groupId>
    <artifactId>HikariCP</artifactId>
    <version>3.1.0</version>
</dependency>

Spring Boot 2.1

Upgrade to Hikaricp 3.2.0

Tomcat JDBC Connection Pool

TODO

Apache Commons DBCP2

TODO

Spring Boot 2.1

Upgrade to Commons Dbcp2 2.4.0
Upgrade to Commons Dbcp2 2.5.0

埋め込みデータベース

H2

[Installation] (http://www.h2database.com/html/installation.html)

Supported Platforms

As this database is written in Java, it can run on many different platforms. It is tested with Java 7.

[Change Log] (http://www.h2database.com/html/changelog.html)

Version 1.4.197 (2018-03-18)

  • PR #783: Add Bits implementation for Java 9 and later versions

HSQLDB

[HSQLDB] (http://hsqldb.org/)

latest official release

Latest version 2.4.1 works with JDK 8, 9 and 10. Version 2.3.6 for JDK 6 is also available.

Apache Derby

[Release Notes for Apache Derby 10.14.2.0] (https://db.apache.org/derby/releases/release-10.14.2.0.cgi)

Overview

Support for Java SE 8 is being sunsetted and will not be supported by the next (10.15) release family.
The 10.14 release family supports the following Java and JDBC versions:

  • Java SE 8 and higher with JDBC 4.2.
  • Java SE 8 compact profile 2.

Spring Boot 2.1

Upgrade to Derby 10.14.2.0

データベースマイグレーション

flyway

[Release Notes] (https://flywaydb.org/documentation/releaseNotes)

Flyway 5.1.0 (2018-05-24)

Issue 2019 Java 10 support

Flyway 5.0.7 (2018-01-30)

Issue 1912 Flyway now requires the Java 9 compiler to build. Java runtime compatibility is unchanged.

Spring Boot 2.1

Upgrade to Flyway 5.1.3
Upgrade to Flyway 5.1.4

liquibase

TODO

Spring Boot 2.1

Upgrade to Liquibase 3.6.1

バリデーター

Hibernate Validator

Spring Boot 2.1

6.0.10.Final

Java 11

[Hibernate Validator 6.0.11.Final released] (http://in.relation.to/2018/07/18/hibernate-validator-6011-final-out/)

We just released Hibernate Validator 6.0.11.Final which comes with an improved compatibility with JDK 11 and a couple of bugfixes.

APPサーバー

Tomcat

[Apache Tomcat Versions] (http://tomcat.apache.org/whichversion.html)

Apache Tomcat Version Latest Released Version Supported Java Versions
9.0.x 9.0.8 8 and later
8.5.x 8.5.31 7 and later

Spring Boot 2.1

Support embedding Tomcat 9

Undertow

[Undertow FAQ] (http://undertow.io/undertow-docs/undertow-docs-2.0.0/index.html#undertow-faq)

What JDK does Undertow require?

Undertow 1.4 and earlier require Java 7 or later.
Undertow 2.0 requires Java 8 or later.

Spring Boot 2.1

Support embedding Undertow 2.0
Upgrade to Undertow 2.0.11.Final

Jetty

[What Version Do I Use?] (http://www.eclipse.org/jetty/documentation/9.4.x/what-jetty-version.html)

Version JVM
9.4 1.8
9.3 1.8

JAX-RS

Jersey

TODO

Spring Boot 2.1

Upgrade to Jersey 2.27

タスクスケジューラ

quartz

TODO

メッセージングミドルウェア

Apache ActiveMQ

[What platforms does ActiveMQ Support?] (http://activemq.apache.org/what-platforms-does-activemq-support.html)

ActiveMQ 5.0-5.7 supports any Java platform of Java 5.0 or later. To run on 1.4 see these instructions. ActiveMQ 5.8-5.10 require Java 6 or higher and the releases from 5.11 onwards require Java 7 or later.

[ActiveMQ 5.15.0 Release] (http://activemq.apache.org/activemq-5150-release.html)

Change Log

Java 8 Required

The minimum Java version has been upgraded to Java 8.

Apache Kafka

TODO

Spring Boot 2.1

Upgrade to Spring Kafka 2.2.0 snapshots

ロギングフレームワーク

Log4J

[Apache Log4j 2] (https://logging.apache.org/log4j/2.x/)

Log4j 2.4 and greater requires Java 7, versions 2.0-alpha1 to 2.3 required Java 6. Some features require optional dependencies; the documentation for these features specifies the dependencies.

Spring Boot 2.1

Upgrade to Log4j2 2.11.0

Logback

[Dependencies per module] (https://logback.qos.ch/dependencies.html)

As of version 1.1.3, logback requires JDK 1.6.

SLF4J

[Frequently Asked Questions about SLF4J] (https://www.slf4j.org/faq.html)

What are SLF4J's requirements?

As of version 1.7.0, SLF4J requires JDK 1.5 or later. Earlier SLF4J versions, namely SLF4J 1.4, 1.5. and 1.6, required JDK 1.4.

テスティングフレームワーク、モック、アサーション

JUnit 4.x

2018年6月時点での最新バージョンは4.12です。
JUnit 4.13(リリース日未定)で、以下のPRでJava 9のいくつかの問題が解決される予定です。

[Fix bug on JDK 9] (https://github.com/junit-team/junit4/pull/1507)

JUnit 5

[JUnit 5 Release Notes] (https://junit.org/junit5/docs/current/release-notes/)

5.2.0

  • The JUnit Platform Surefire Provider (junit-platform-surefire-provider) now works with and requires Surefire 2.21.0 which allows it to be used with Java 9 and Java 10.

5.1.0

  • Discovering tests in Java 9 modules

Spring Boot 2.1

Upgrade to JUnit 5.2.0

Mockito (2.22.1 - )

[What's new in Mockito 2] (https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2)

The release of Mockito 2 effectively starts Mockito 3 project that focuses on:

  • full-blown Java 8 support, and Java 9 support (depending on the release date)

Spring Boot 2.1

Upgrade to Mockito 2.19.0
Upgrade to Mockito 2.19.1

AssertJ

[AssertJ Core 3.7.0 release : New and noteworthy] (http://joel-costigliola.github.io/assertj/assertj-core-news.html#assertj-core-3.7.0)

Improvements:

  • AssertJ is compatible with Java 9. (Pascal Schumacher)

[AssertJ core 3.0.0 for Java 8 release : New and noteworthy] (http://joel-costigliola.github.io/assertj/assertj-core-news.html#assertj-core-3.0.0)

Breaking changes

  • AssertJ Core 3.0 relies on Java 8.

Spring Boot 2.1

Upgrade to Assertj 3.10.0

ビルドツール

Maven

[Downloading Apache Maven 3.5.3] (https://maven.apache.org/download.cgi)

Maven 3.3+ require JDK 1.7 or above to execute - they still allows you to build against 1.3 and other JDK versions by Using Toolchains

Maven Plugins

Mavenのオフィシャルプラグイン

plugin latest version maven version JDK URL
maven-clean-plugin 3.1.0 3.0 1.7 https://maven.apache.org/plugins/maven-clean-plugin/plugin-info.html
maven-compiler-plugin 3.7.0 3.0 1.7 https://maven.apache.org/plugins/maven-compiler-plugin/plugin-info.html
maven-deploy-plugin 2.8.2 2.2.1 1.5 https://maven.apache.org/plugins/maven-deploy-plugin/plugin-info.html
maven-surefire-plugin 2.22.0 2.2.1 1.6 https://maven.apache.org/surefire/maven-surefire-plugin/plugin-info.html
maven-install-plugin 2.5.2 2.2.1 1.5 https://maven.apache.org/plugins/maven-install-plugin/plugin-info.html
maven-jar-plugin 3.1.0 3.0 1.7 https://maven.apache.org/plugins/maven-jar-plugin/plugin-info.html
maven-war-plugin 3.2.2 3.0 1.7 https://maven.apache.org/plugins/maven-war-plugin/plugin-info.html

Spring Boot 2.1

plugin upgrade to desc
maven-clean-plugin 3.1.0 Official
maven-site-plugin 3.7.1 Official
maven-help-plugin 3.1.0 Official
maven-resources-plugin 3.1.0 Official
maven-dependency-plugin 3.1.1 Official
maven-shade-plugin 3.1.1 Official
maven-jar-plugin 3.1.0 Official
maven-war-plugin 3.2.2 Official
maven-surefire-plugin 2.22.0 Official
maven-failsafe-plugin 2.22.0 Official
maven-exec-plugin 1.6.0 Official
versions-maven-plugin 2.5 MojoHaus
duplicate-finder-maven-plugin 1.3.0 basepom
  • Remove maven-eclipse-plugin as the project has been retired

Gradle

[Gradle 4.7 Release Notes] (https://docs.gradle.org/4.7/release-notes.html)

Java enthusiasts will be happy to read that this release supports running Gradle builds with JDK 10.

[Building Java 9 Modules] (https://guides.gradle.org/building-java-9-modules/)

While Gradle version 4.7 doesn’t have first-class support for Java 9 modules yet, this guide shows you how to experiment with them before that support is complete.

Java 11

[Java 11 support] (https://github.com/gradle/gradle/issues/5120)

IDEのサポート状況

IDEで確認するバージョンは下記の2点です。

  • 開発、コンパイルで使用するバージョン (コードアシストや実行、コンパイルで使用する)
  • IDEの実行環境のバージョン (IDE自体が使用する)

Spring Tool Suite

[Spring Tool Suite 3.9.5: New and Noteworthy] (https://docs.spring.io/sts/nan/v395/NewAndNoteworthy.html)

Running on JDK9/JDK10

STS 3.9.5 can run on top of a JDK out-of-the-box. However, please notice that the Maven support in Eclipse/STS runs within the JVM of the IDE and therefore also uses the JDK9/10 runtime. While that isn't necessarily a problem, having Maven modules in your build that aren't compatible with Java 9 might cause your project build to fail in Eclipse/STS.

Eclipse Oxygen

[Eclipse Oxygen.3a IDE Improvements: Java 10] (https://eclipsehowl.wordpress.com/2018/04/12/eclipse-oxygen-3a-ide-improvements-java-10/)

Three weeks after the Oxygen.3 and the Java 10 release, Oxygen.3a now adds official support for Java 10 which was previously offered only as a pre-release via the Eclipse Marketplace.

実行環境のバージョン

環境変数JAVA_HOMEに設定したJREがEclipseの実行環境となります。

> echo %JAVA_HOME%
D:\openjdk\jdk-10.0.1

> java -version
openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10)
OpenJDK 64-Bit Server VM (build 10.0.1+10, mixed mode)

確認するにはメニューのHelp → About Eclipse → Installation Details → Configurationの-vmの次の行を見ます。
JAVA_HOMEにOpenJDK 10.0を指定した場合は下記のようになります。

-vm
D:\openjdk\jdk-10.0.1\bin\server\jvm.dll

任意のJREを指定する場合はeclipse.iniファイルの-vmargsの直前に下記の2行を追加します。この例ではOpenJDK 9.0.4を指定しています。

//... 省略
-vm                                          // 追加
D:\openjdk\jdk-9.0.4\bin\server\jvm.dll      // 追加
-vmargs
//... 省略

Eclipse Photon

[Eclipse IDE, Photon Edition New and Noteworthy] (http://www.eclipse.org/photon/noteworthy/index.php)

最初からJava9および10をサポートしています。

M2Eclipse

M2Eclipse(M2E)はEclipseのMavenプラグインです。

[M2Eclipse Downloads] (http://www.eclipse.org/m2e/m2e-downloads.html)

M2Eclipse 1.7.0/Neon

M2Eclipse 1.7.0/Neon is tested and validated against Eclipse 4.6 (Neon)
M2Eclipse 1.7.0/Neon requires minimum java 8

Eclipse Oxygen (4.7)ではE2Eclipse 1.8.xが同梱されているようですが、リリースノート等のドキュメントが見つけられていません。

eclipse/buildship

The Eclipse Plug-ins for Gradle project.

buildshipはEclipseのGradleプラグインです。

[Java 9 configuration] (https://github.com/eclipse/buildship/issues/658)

IntelliJ IDEA

実行環境のバージョン

[Install and set up IntelliJ IDEA] (https://www.jetbrains.com/help/idea/install-and-set-up-product.html)

JRE 1.8 is bundled with the IntelliJ IDEA distribution. You do not need to install Java on your computer to run IntelliJ IDEA.

A standalone JDK is required for Java development.

Boot JDKを切り替えることができますが、通常はバンドルされているJREのバージョンを変える必要はありません。

Ctrl + Shift + Aでアクションサーチから"switch"と入力し、サジェストで"Switch Boot JDK..."を選びます。

b.png

試しにOpenJDK 10.0に切り替えたところ、イベントログに下記のメッセージが出力されました。

Please consider switching to the bundled Java runtime that is better suited for the IDE (your current Java runtime is 10.0.1+10 by Oracle Corporation).

Ready to Java 11

IntelliJ IDEA 2018.2でサポートされます。

[Java 11 in IntelliJ IDEA 2018.2] (https://blog.jetbrains.com/idea/2018/06/java-11-in-intellij-idea-2018-2/)

[Inspections and Intentions in IntelliJ IDEA 2018.2 - Youtube] (https://www.youtube.com/watch?v=1JBHAxNAcis)

0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?