Skip to content

Commit 6f99d53

Browse files
authored
Merge pull request #30 from arenadata/feature/HADOOP-19674-backport
fix(client-runtime): bundle jaxb-runtime so shaded JaxbAnnotationIntrospector resolves on JDK 11+
2 parents 4eb7c89 + 483063b commit 6f99d53

4 files changed

Lines changed: 34 additions & 0 deletions

File tree

LICENSE-binary

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,13 @@ javax.ws.rs:jsr311-api:1.1.1
525525
javax.xml.bind:jaxb-api:2.2.11
526526

527527

528+
Eclipse Distribution License (EDL) 1.0
529+
--------------------------
530+
531+
jakarta.xml.bind:jakarta.xml.bind-api:2.3.3
532+
org.glassfish.jaxb:jaxb-runtime:2.3.9
533+
534+
528535
Eclipse Public License 1.0
529536
--------------------------
530537

hadoop-client-modules/hadoop-client-minicluster/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,13 @@
709709
<exclude>org.bouncycastle:*</exclude>
710710
<!-- Leave snappy that includes native methods which cannot be relocated. -->
711711
<exclude>org.xerial.snappy:*</exclude>
712+
<!-- jaxb and its transitives are bundled (relocated) into
713+
hadoop-client-runtime; don't duplicate them here. -->
714+
<exclude>org.glassfish.jaxb:*</exclude>
715+
<exclude>jakarta.xml.bind:*</exclude>
716+
<exclude>com.sun.xml.bind:*</exclude>
717+
<exclude>com.sun.istack:*</exclude>
718+
<exclude>com.sun.activation:*</exclude>
712719
</excludes>
713720
</artifactSet>
714721
<filters>

hadoop-client-modules/hadoop-client-runtime/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@
9999
<artifactId>jsr305</artifactId>
100100
<scope>runtime</scope>
101101
</dependency>
102+
<!-- jackson-module-jaxb-annotations (bundled and relocated by shade) references
103+
javax.xml.bind.* annotations. javax.xml.bind:jaxb-api is excluded above, and
104+
JDK 11+ removed it. Bundle jaxb-runtime so its transitive jakarta-xml-bind-api
105+
2.3.x (which still ships classes under the javax.xml.bind package) is shaded
106+
into this jar, satisfying the relocated references. Optional so downstream
107+
consumers don't pick up the (already-bundled) transitives. -->
108+
<dependency>
109+
<groupId>org.glassfish.jaxb</groupId>
110+
<artifactId>jaxb-runtime</artifactId>
111+
<scope>runtime</scope>
112+
<optional>true</optional>
113+
</dependency>
102114
<!-- Move log4j to optional, since it is needed for some pieces folks might not use:
103115
* one of the three custom log4j appenders we have
104116
-->

hadoop-project/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
<!-- jersey version -->
6969
<jersey.version>1.19.4</jersey.version>
7070

71+
<!-- jaxb version -->
72+
<jaxb.version>2.3.9</jaxb.version>
73+
7174
<!-- jackson versions -->
7275
<jackson2.version>2.18.6</jackson2.version>
7376
<jackson2.databind.version>2.18.6</jackson2.databind.version>
@@ -2178,6 +2181,11 @@
21782181
<artifactId>cache-api</artifactId>
21792182
<version>${cache.api.version}</version>
21802183
</dependency>
2184+
<dependency>
2185+
<groupId>org.glassfish.jaxb</groupId>
2186+
<artifactId>jaxb-runtime</artifactId>
2187+
<version>${jaxb.version}</version>
2188+
</dependency>
21812189
</dependencies>
21822190
</dependencyManagement>
21832191

0 commit comments

Comments
 (0)