Skip to content

Commit

Permalink
Migrate JAXB Runtime from com.sun.xml.bind:jaxb-impl to `org.glassf…
Browse files Browse the repository at this point in the history
…ish.jaxb:jaxb-runtime` (#29013)
  • Loading branch information
linghengqian authored Nov 12, 2023
1 parent f8a420f commit d696698
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 62 deletions.
5 changes: 2 additions & 3 deletions distribution/proxy-native/src/main/release-docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions distribution/proxy/src/main/release-docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Quarkus 3,Micronaut Framework 4 和 Helidon 3。
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.8</version>
<version>2.3.1</version>
</dependency>
</dependencies>
</project>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ also applies to other Jakarta EE-based Web Frameworks, such as Quarkus 3, Micron
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.8</version>
<version>2.3.1</version>
</dependency>
</dependencies>
</project>
Expand Down
9 changes: 2 additions & 7 deletions kernel/sql-federation/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
9 changes: 2 additions & 7 deletions kernel/sql-federation/executor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
9 changes: 2 additions & 7 deletions kernel/sql-federation/optimizer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
8 changes: 2 additions & 6 deletions kernel/transaction/type/xa/provider/narayana/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
Expand Down
8 changes: 2 additions & 6 deletions mode/type/standalone/repository/provider/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,8 @@
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}

Expand Down
16 changes: 6 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
<freemarker.version>2.3.31</freemarker.version>
<bytebuddy.version>1.14.8</bytebuddy.version>

<jaxb.version>2.3.0</jaxb.version>
<jaxb-api.version>2.3.1</jaxb-api.version>
<jaxb-runtime.version>2.3.1</jaxb-runtime.version>
<annotation-api.version>1.3.2</annotation-api.version>
<activation-api.version>1.2.0</activation-api.version>

Expand Down Expand Up @@ -298,17 +299,12 @@
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.version}</version>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb-runtime.version}</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
Expand Down
8 changes: 2 additions & 6 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,8 @@
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
Expand Down

0 comments on commit d696698

Please sign in to comment.