From d696698b0e566a6ecf79c29f609e397734c21a33 Mon Sep 17 00:00:00 2001 From: Ling Hengqian Date: Sun, 12 Nov 2023 21:15:23 +0800 Subject: [PATCH] Migrate JAXB Runtime from `com.sun.xml.bind:jaxb-impl` to `org.glassfish.jaxb:jaxb-runtime` (#29013) --- .../proxy-native/src/main/release-docs/LICENSE | 5 ++--- distribution/proxy/src/main/release-docs/LICENSE | 5 ++--- .../jdbc-driver/spring-boot/_index.cn.md | 2 +- .../jdbc-driver/spring-boot/_index.en.md | 2 +- kernel/sql-federation/core/pom.xml | 9 ++------- kernel/sql-federation/executor/pom.xml | 9 ++------- kernel/sql-federation/optimizer/pom.xml | 9 ++------- .../type/xa/provider/narayana/pom.xml | 8 ++------ .../standalone/repository/provider/jdbc/pom.xml | 8 ++------ .../jdbc/sql/JDBCRepositorySQLLoader.java | 10 +++++----- pom.xml | 16 ++++++---------- test/pom.xml | 8 ++------ 12 files changed, 29 insertions(+), 62 deletions(-) diff --git a/distribution/proxy-native/src/main/release-docs/LICENSE b/distribution/proxy-native/src/main/release-docs/LICENSE index 12d1103951cdf..dd896d2b71b29 100644 --- a/distribution/proxy-native/src/main/release-docs/LICENSE +++ b/distribution/proxy-native/src/main/release-docs/LICENSE @@ -345,9 +345,8 @@ The text of each license is also included at licenses/LICENSE-[project].txt. javax.activation-api 1.2.0: https://github.com/javaee/javax.annotation, CDDL jta 1.1: http://jta-spec.java.net, CDDL - jaxb-api 2.3.0: http://www.oracle.com, CDDL - jaxb-core 2.3.0: http://www.oracle.com, CDDL - jaxb-impl 2.3.0 http://www.oracle.com, CDDL + jaxb-api 2.3.1: http://www.oracle.com, CDDL + jaxb-runtime 2.3.1 https://javaee.github.io/jaxb-v2/, CDDL ======================================================================== EPL licenses diff --git a/distribution/proxy/src/main/release-docs/LICENSE b/distribution/proxy/src/main/release-docs/LICENSE index 12d1103951cdf..dd896d2b71b29 100644 --- a/distribution/proxy/src/main/release-docs/LICENSE +++ b/distribution/proxy/src/main/release-docs/LICENSE @@ -345,9 +345,8 @@ The text of each license is also included at licenses/LICENSE-[project].txt. javax.activation-api 1.2.0: https://github.com/javaee/javax.annotation, CDDL jta 1.1: http://jta-spec.java.net, CDDL - jaxb-api 2.3.0: http://www.oracle.com, CDDL - jaxb-core 2.3.0: http://www.oracle.com, CDDL - jaxb-impl 2.3.0 http://www.oracle.com, CDDL + jaxb-api 2.3.1: http://www.oracle.com, CDDL + jaxb-runtime 2.3.1 https://javaee.github.io/jaxb-v2/, CDDL ======================================================================== EPL licenses diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md index db1d1a88bbaae..41bd3d00a507c 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md @@ -56,7 +56,7 @@ Quarkus 3,Micronaut Framework 4 和 Helidon 3。 org.glassfish.jaxb jaxb-runtime - 2.3.8 + 2.3.1 diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md index cadc2364bc9d1..e81c02b228a77 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md @@ -57,7 +57,7 @@ also applies to other Jakarta EE-based Web Frameworks, such as Quarkus 3, Micron org.glassfish.jaxb jaxb-runtime - 2.3.8 + 2.3.1 diff --git a/kernel/sql-federation/core/pom.xml b/kernel/sql-federation/core/pom.xml index c9b47b9970786..fd9da5df6573a 100644 --- a/kernel/sql-federation/core/pom.xml +++ b/kernel/sql-federation/core/pom.xml @@ -60,13 +60,8 @@ test - com.sun.xml.bind - jaxb-core - test - - - com.sun.xml.bind - jaxb-impl + org.glassfish.jaxb + jaxb-runtime test diff --git a/kernel/sql-federation/executor/pom.xml b/kernel/sql-federation/executor/pom.xml index c1bee817c5afe..5d396ccfd7ed2 100644 --- a/kernel/sql-federation/executor/pom.xml +++ b/kernel/sql-federation/executor/pom.xml @@ -80,13 +80,8 @@ test - com.sun.xml.bind - jaxb-core - test - - - com.sun.xml.bind - jaxb-impl + org.glassfish.jaxb + jaxb-runtime test diff --git a/kernel/sql-federation/optimizer/pom.xml b/kernel/sql-federation/optimizer/pom.xml index 5a0fca9e88884..00b744130ac49 100644 --- a/kernel/sql-federation/optimizer/pom.xml +++ b/kernel/sql-federation/optimizer/pom.xml @@ -100,13 +100,8 @@ test - com.sun.xml.bind - jaxb-core - test - - - com.sun.xml.bind - jaxb-impl + org.glassfish.jaxb + jaxb-runtime test diff --git a/kernel/transaction/type/xa/provider/narayana/pom.xml b/kernel/transaction/type/xa/provider/narayana/pom.xml index 5d53c349f67b1..4355af3d307f1 100644 --- a/kernel/transaction/type/xa/provider/narayana/pom.xml +++ b/kernel/transaction/type/xa/provider/narayana/pom.xml @@ -63,12 +63,8 @@ jaxb-api - com.sun.xml.bind - jaxb-core - - - com.sun.xml.bind - jaxb-impl + org.glassfish.jaxb + jaxb-runtime javax.activation diff --git a/mode/type/standalone/repository/provider/jdbc/pom.xml b/mode/type/standalone/repository/provider/jdbc/pom.xml index 0b81d67144e57..280ecadaf4f0a 100644 --- a/mode/type/standalone/repository/provider/jdbc/pom.xml +++ b/mode/type/standalone/repository/provider/jdbc/pom.xml @@ -45,12 +45,8 @@ jaxb-api - com.sun.xml.bind - jaxb-core - - - com.sun.xml.bind - jaxb-impl + org.glassfish.jaxb + jaxb-runtime javax.activation diff --git a/mode/type/standalone/repository/provider/jdbc/src/main/java/org/apache/shardingsphere/mode/repository/standalone/jdbc/sql/JDBCRepositorySQLLoader.java b/mode/type/standalone/repository/provider/jdbc/src/main/java/org/apache/shardingsphere/mode/repository/standalone/jdbc/sql/JDBCRepositorySQLLoader.java index 837d5974bdbb8..efabbb5301d92 100644 --- a/mode/type/standalone/repository/provider/jdbc/src/main/java/org/apache/shardingsphere/mode/repository/standalone/jdbc/sql/JDBCRepositorySQLLoader.java +++ b/mode/type/standalone/repository/provider/jdbc/src/main/java/org/apache/shardingsphere/mode/repository/standalone/jdbc/sql/JDBCRepositorySQLLoader.java @@ -82,7 +82,7 @@ public static JDBCRepositorySQL load(final String type) { } /** - * Under the GraalVM Native Image corresponding to GraalVM CE 21.0.1, although there is + * Under the GraalVM Native Image corresponding to GraalVM CE 23.0.2 For JDK 17.0.9, although there is * `com.oracle.svm.core.jdk.resources.NativeImageResourceFileSystemProvider`, the corresponding * `com.oracle.svm.core.jdk.resources.NativeImageResourceFileSystem` does not autoload. This is mainly to align the * behavior of `ZipFileSystemProvider`, so ShardingSphere need to manually open and close the FileSystem @@ -101,12 +101,12 @@ public static JDBCRepositorySQL load(final String type) { * @see sun.nio.fs.UnixFileSystemProvider */ private static JDBCRepositorySQL loadFromDirectory(final URL url, final String type) throws URISyntaxException, IOException { - if (null != System.getProperty("org.graalvm.nativeimage.imagecode")) { - try (FileSystem ignored = FileSystems.newFileSystem(URI.create("resource:/"), Collections.singletonMap("create", "true"))) { + if (null == System.getProperty("org.graalvm.nativeimage.imagecode") || !"runtime".equals(System.getProperty("org.graalvm.nativeimage.imagecode"))) { + return loadFromDirectoryLegacy(url, type); + } else { + try (FileSystem ignored = FileSystems.newFileSystem(URI.create("resource:/"), Collections.emptyMap())) { return loadFromDirectoryLegacy(url, type); } - } else { - return loadFromDirectoryLegacy(url, type); } } diff --git a/pom.xml b/pom.xml index 880a085de5e8f..737a886fe56e2 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,8 @@ 2.3.31 1.14.8 - 2.3.0 + 2.3.1 + 2.3.1 1.3.2 1.2.0 @@ -298,17 +299,12 @@ javax.xml.bind jaxb-api - ${jaxb.version} + ${jaxb-api.version} - com.sun.xml.bind - jaxb-core - ${jaxb.version} - - - com.sun.xml.bind - jaxb-impl - ${jaxb.version} + org.glassfish.jaxb + jaxb-runtime + ${jaxb-runtime.version} javax.annotation diff --git a/test/pom.xml b/test/pom.xml index 0bd3555cb7819..01483d29378ba 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -56,12 +56,8 @@ jaxb-api - com.sun.xml.bind - jaxb-core - - - com.sun.xml.bind - jaxb-impl + org.glassfish.jaxb + jaxb-runtime javax.activation