Skip to content

Commit 7cf1534

Browse files
authored
HADOOP-19674. [JDK 17] Add jaxb-runtime (#7928)
* HADOOP-19674. [JDK 17] Add jaxb-runtime - Since JDK11 javax.xml.bind modules is removed source: https://docs.oracle.com/en/java/javase/24/migrate/removed-tools-and-components.html#GUID-11F78105-D735-430D-92DD-6C37958FCBC3 - Jetty needs a jaxb-impl to be able to start - So we provide the jaxb-runtime artifact everywhere where Jetty Server is a dependency - If some modules excludes jetty-server then most probably jaxb-runtime is not needed for them, so we exclude it. - ehcache was using different version of jaxb-runtime, so it become excluded * HADOOP-19674. [JDK 17] Add jaxb-runtime - Remove not necessary excludes * HADOOP-19674. [JDK 17] Add jaxb-runtime - Put back one exclude what seems to be necessary - Otherwise at and of install we can see the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-banned-dependencies) on project hadoop-client-check-test-invariants: [ERROR] Rule 1: org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message: [ERROR] Duplicate classes found: [ERROR] [ERROR] Found in: [ERROR] org.apache.hadoop:hadoop-client-minicluster:jar:3.5.0-SNAPSHOT:compile [ERROR] org.apache.hadoop:hadoop-client-runtime:jar:3.5.0-SNAPSHOT:compile [ERROR] Duplicate classes: [ERROR] org/apache/hadoop/shaded/com/sun/activation/registries/MimeTypeEntry.class ... Cannon to right of them, * HADOOP-19674. [JDK 17] Add jaxb-runtime - If we exclude the dependency from hadoop common, maybe we should do the same with the hdfs-client Cannon to left of them, * HADOOP-19674. [JDK 17] Add jaxb-runtime - there were 2 empty line at end of file, so I removed one of them to retrigger the build. Cannon in front of them.
1 parent 0b05102 commit 7cf1534

File tree

9 files changed

+48
-1
lines changed
  • hadoop-client-modules/hadoop-client
  • hadoop-common-project
  • hadoop-hdfs-project/hadoop-hdfs-httpfs
  • hadoop-project
  • hadoop-yarn-project/hadoop-yarn
    • hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api
    • hadoop-yarn-server

9 files changed

+48
-1
lines changed

LICENSE-binary

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ Eclipse Distribution License (EDL) 1.0
510510
--------------------------
511511

512512
jakarta.xml.bind:jakarta.xml.bind-api:2.3.3
513+
org.glassfish.jaxb:jaxb-runtime:2.3.9
513514

514515
Eclipse Public License 1.0
515516
--------------------------

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
<groupId>org.eclipse.jetty</groupId>
5454
<artifactId>jetty-server</artifactId>
5555
</exclusion>
56+
<exclusion>
57+
<groupId>org.glassfish.jaxb</groupId>
58+
<artifactId>jaxb-runtime</artifactId>
59+
</exclusion>
5660
<exclusion>
5761
<groupId>org.eclipse.jetty</groupId>
5862
<artifactId>jetty-util</artifactId>
@@ -106,6 +110,10 @@
106110
<groupId>org.eclipse.jetty</groupId>
107111
<artifactId>jetty-server</artifactId>
108112
</exclusion>
113+
<exclusion>
114+
<groupId>org.glassfish.jaxb</groupId>
115+
<artifactId>jaxb-runtime</artifactId>
116+
</exclusion>
109117
</exclusions>
110118
</dependency>
111119

@@ -267,4 +275,3 @@
267275
</dependencies>
268276

269277
</project>
270-

hadoop-common-project/hadoop-common/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,11 @@
390390
<artifactId>junit-platform-launcher</artifactId>
391391
<scope>test</scope>
392392
</dependency>
393+
<dependency>
394+
<groupId>org.glassfish.jaxb</groupId>
395+
<artifactId>jaxb-runtime</artifactId>
396+
<scope>runtime</scope>
397+
</dependency>
393398
</dependencies>
394399

395400
<build>

hadoop-common-project/hadoop-kms/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
<groupId>org.eclipse.jetty</groupId>
7777
<artifactId>jetty-server</artifactId>
7878
</dependency>
79+
<dependency>
80+
<groupId>org.glassfish.jaxb</groupId>
81+
<artifactId>jaxb-runtime</artifactId>
82+
<scope>runtime</scope>
83+
</dependency>
7984
<dependency>
8085
<groupId>org.eclipse.jetty</groupId>
8186
<artifactId>jetty-webapp</artifactId>

hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@
8181
<groupId>org.eclipse.jetty</groupId>
8282
<artifactId>jetty-server</artifactId>
8383
</dependency>
84+
<dependency>
85+
<groupId>org.glassfish.jaxb</groupId>
86+
<artifactId>jaxb-runtime</artifactId>
87+
<scope>runtime</scope>
88+
</dependency>
8489
<dependency>
8590
<groupId>org.eclipse.jetty</groupId>
8691
<artifactId>jetty-webapp</artifactId>

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
<jersey2.version>2.46</jersey2.version>
7070

71+
<!-- jaxb version -->
72+
<jaxb.version>2.3.9</jaxb.version>
73+
7174
<!-- jackson versions -->
7275
<jackson2.version>2.14.3</jackson2.version>
7376
<jackson2.databind.version>2.14.3</jackson2.databind.version>
@@ -2152,6 +2155,11 @@
21522155
<artifactId>jersey-media-json-jettison</artifactId>
21532156
<version>${jersey2.version}</version>
21542157
</dependency>
2158+
<dependency>
2159+
<groupId>org.glassfish.jaxb</groupId>
2160+
<artifactId>jaxb-runtime</artifactId>
2161+
<version>${jaxb.version}</version>
2162+
</dependency>
21552163
<dependency>
21562164
<groupId>net.jodah</groupId>
21572165
<artifactId>failsafe</artifactId>

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@
163163
<groupId>org.eclipse.jetty</groupId>
164164
<artifactId>jetty-server</artifactId>
165165
</dependency>
166+
<dependency>
167+
<groupId>org.glassfish.jaxb</groupId>
168+
<artifactId>jaxb-runtime</artifactId>
169+
<scope>runtime</scope>
170+
</dependency>
166171
<dependency>
167172
<groupId>org.eclipse.jetty</groupId>
168173
<artifactId>jetty-util</artifactId>

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@
129129
<dependency>
130130
<groupId>org.ehcache</groupId>
131131
<artifactId>ehcache</artifactId>
132+
<exclusions>
133+
<exclusion>
134+
<groupId>org.glassfish.jaxb</groupId>
135+
<artifactId>jaxb-runtime</artifactId>
136+
</exclusion>
137+
</exclusions>
132138
</dependency>
133139
<dependency>
134140
<groupId>com.github.ben-manes.caffeine</groupId>

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@
9898
<groupId>org.eclipse.jetty</groupId>
9999
<artifactId>jetty-server</artifactId>
100100
</dependency>
101+
<dependency>
102+
<groupId>org.glassfish.jaxb</groupId>
103+
<artifactId>jaxb-runtime</artifactId>
104+
<scope>runtime</scope>
105+
</dependency>
101106

102107
<dependency>
103108
<groupId>org.junit.jupiter</groupId>

0 commit comments

Comments
 (0)