Skip to content

Commit 6bdf2bd

Browse files
committed
[KYUUBI #6392] Support javax.servlet and jakarta.servlet co-exist
# 🔍 Description This PR makes `javax.servlet` and `jakarta.servlet` co-exist, by introducing `javax.servlet-api-4.0.1` and upgrade `jakarta.servlet-api` to 5.0.0. (6.0.0 requires JDK 11) Spark 4.0 migrated from `javax.servlet` to `jakarta.servlet` in SPARK-47118 while Kyuubi still uses `javax.servlet` in other modules, we should allow them to co-exist for a while. ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 Pass GHA. --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6392 from pan3793/servlet. Closes #6392 27d4125 [Cheng Pan] fix 9f1e722 [Cheng Pan] other spark modules f4545dc [Cheng Pan] fix 313826f [Cheng Pan] exclude 7d50281 [Cheng Pan] Support javax.servlet and jakarta.servlet co-exist Authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
1 parent aa04c0e commit 6bdf2bd

File tree

19 files changed

+532
-18
lines changed

19 files changed

+532
-18
lines changed

LICENSE-binary

+4-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ jakarta.xml.bind:jakarta.xml.bind-api
332332
Eclipse Public License (EPL) 2.0
333333
--------------------------------
334334
jakarta.annotation:jakarta.annotation-api
335-
jakarta.servlet:jakarta.servlet-api
336335
jakarta.ws.rs:jakarta.ws.rs-api
337336
org.glassfish.hk2:hk2-api
338337
org.glassfish.hk2:hk2-locator
@@ -354,6 +353,10 @@ com.theokanning.openai-gpt3-java:client
354353
com.theokanning.openai-gpt3-java:service
355354
org.checkerframework:checker-qual
356355

356+
CDDL License 1.1
357+
----------------
358+
javax.servlet-api
359+
357360
This product also contains the following third-party components, the information
358361
is auto-generated by `pnpm licenses list --prod`.
359362
-----------------------------------------------------

dev/dependencyList

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ jackson-module-jaxb-annotations/2.15.4//jackson-module-jaxb-annotations-2.15.4.j
7070
jackson-module-scala_2.12/2.15.4//jackson-module-scala_2.12-2.15.4.jar
7171
jakarta.annotation-api/1.3.5//jakarta.annotation-api-1.3.5.jar
7272
jakarta.inject/2.6.1//jakarta.inject-2.6.1.jar
73-
jakarta.servlet-api/4.0.4//jakarta.servlet-api-4.0.4.jar
7473
jakarta.validation-api/2.0.2//jakarta.validation-api-2.0.2.jar
7574
jakarta.ws.rs-api/2.1.6//jakarta.ws.rs-api-2.1.6.jar
7675
jakarta.xml.bind-api/2.3.2//jakarta.xml.bind-api-2.3.2.jar
7776
javassist/3.25.0-GA//javassist-3.25.0-GA.jar
77+
javax.servlet-api/4.0.1//javax.servlet-api-4.0.1.jar
7878
jcl-over-slf4j/1.7.36//jcl-over-slf4j-1.7.36.jar
7979
jersey-client/2.39.1//jersey-client-2.39.1.jar
8080
jersey-common/2.39.1//jersey-common-2.39.1.jar

extensions/spark/kyuubi-extension-spark-3-2/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@
103103
<scope>test</scope>
104104
</dependency>
105105

106+
<dependency>
107+
<groupId>javax.servlet</groupId>
108+
<artifactId>javax.servlet-api</artifactId>
109+
<scope>test</scope>
110+
</dependency>
111+
112+
<dependency>
113+
<groupId>jakarta.servlet</groupId>
114+
<artifactId>jakarta.servlet-api</artifactId>
115+
<scope>test</scope>
116+
</dependency>
117+
106118
<dependency>
107119
<groupId>org.apache.logging.log4j</groupId>
108120
<artifactId>log4j-1.2-api</artifactId>

extensions/spark/kyuubi-extension-spark-3-3/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@
118118
<artifactId>hadoop-client-runtime</artifactId>
119119
<scope>test</scope>
120120
</dependency>
121+
122+
<dependency>
123+
<groupId>javax.servlet</groupId>
124+
<artifactId>javax.servlet-api</artifactId>
125+
<scope>test</scope>
126+
</dependency>
127+
128+
<dependency>
129+
<groupId>jakarta.servlet</groupId>
130+
<artifactId>jakarta.servlet-api</artifactId>
131+
<scope>test</scope>
132+
</dependency>
121133
</dependencies>
122134

123135
<build>

extensions/spark/kyuubi-extension-spark-3-4/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@
105105
<scope>test</scope>
106106
</dependency>
107107

108+
<dependency>
109+
<groupId>javax.servlet</groupId>
110+
<artifactId>javax.servlet-api</artifactId>
111+
<scope>test</scope>
112+
</dependency>
113+
114+
<dependency>
115+
<groupId>jakarta.servlet</groupId>
116+
<artifactId>jakarta.servlet-api</artifactId>
117+
<scope>test</scope>
118+
</dependency>
119+
108120
<dependency>
109121
<groupId>org.apache.logging.log4j</groupId>
110122
<artifactId>log4j-slf4j-impl</artifactId>

extensions/spark/kyuubi-extension-spark-3-5/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@
105105
<scope>test</scope>
106106
</dependency>
107107

108+
<dependency>
109+
<groupId>javax.servlet</groupId>
110+
<artifactId>javax.servlet-api</artifactId>
111+
<scope>test</scope>
112+
</dependency>
113+
114+
<dependency>
115+
<groupId>jakarta.servlet</groupId>
116+
<artifactId>jakarta.servlet-api</artifactId>
117+
<scope>test</scope>
118+
</dependency>
119+
108120
<dependency>
109121
<groupId>org.apache.logging.log4j</groupId>
110122
<artifactId>log4j-slf4j-impl</artifactId>

extensions/spark/kyuubi-extension-spark-common/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@
8888
<scope>test</scope>
8989
</dependency>
9090

91+
<dependency>
92+
<groupId>javax.servlet</groupId>
93+
<artifactId>javax.servlet-api</artifactId>
94+
<scope>test</scope>
95+
</dependency>
96+
97+
<dependency>
98+
<groupId>jakarta.servlet</groupId>
99+
<artifactId>jakarta.servlet-api</artifactId>
100+
<scope>test</scope>
101+
</dependency>
102+
91103
<dependency>
92104
<groupId>org.apache.logging.log4j</groupId>
93105
<artifactId>log4j-1.2-api</artifactId>

extensions/spark/kyuubi-extension-spark-jdbc-dialect/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@
3737
<artifactId>spark-sql_${scala.binary.version}</artifactId>
3838
<scope>provided</scope>
3939
</dependency>
40+
41+
<dependency>
42+
<groupId>javax.servlet</groupId>
43+
<artifactId>javax.servlet-api</artifactId>
44+
<scope>test</scope>
45+
</dependency>
46+
47+
<dependency>
48+
<groupId>jakarta.servlet</groupId>
49+
<artifactId>jakarta.servlet-api</artifactId>
50+
<scope>test</scope>
51+
</dependency>
4052
</dependencies>
4153

4254
<build>

extensions/spark/kyuubi-spark-authz/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,18 @@
307307
<!-- for hive related test only -->
308308
</dependency>
309309

310+
<dependency>
311+
<groupId>javax.servlet</groupId>
312+
<artifactId>javax.servlet-api</artifactId>
313+
<scope>test</scope>
314+
</dependency>
315+
316+
<dependency>
317+
<groupId>jakarta.servlet</groupId>
318+
<artifactId>jakarta.servlet-api</artifactId>
319+
<scope>test</scope>
320+
</dependency>
321+
310322
<dependency>
311323
<groupId>org.apache.logging.log4j</groupId>
312324
<artifactId>log4j-api</artifactId>

extensions/spark/kyuubi-spark-connector-hive/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@
110110
<artifactId>hadoop-client-runtime</artifactId>
111111
<scope>test</scope>
112112
</dependency>
113+
114+
<dependency>
115+
<groupId>javax.servlet</groupId>
116+
<artifactId>javax.servlet-api</artifactId>
117+
<scope>test</scope>
118+
</dependency>
119+
120+
<dependency>
121+
<groupId>jakarta.servlet</groupId>
122+
<artifactId>jakarta.servlet-api</artifactId>
123+
<scope>test</scope>
124+
</dependency>
113125
</dependencies>
114126

115127
<build>

extensions/spark/kyuubi-spark-connector-tpcds/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,18 @@
128128
<artifactId>hadoop-client-runtime</artifactId>
129129
<scope>test</scope>
130130
</dependency>
131+
132+
<dependency>
133+
<groupId>javax.servlet</groupId>
134+
<artifactId>javax.servlet-api</artifactId>
135+
<scope>test</scope>
136+
</dependency>
137+
138+
<dependency>
139+
<groupId>jakarta.servlet</groupId>
140+
<artifactId>jakarta.servlet-api</artifactId>
141+
<scope>test</scope>
142+
</dependency>
131143
</dependencies>
132144

133145
<build>

extensions/spark/kyuubi-spark-connector-tpch/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@
127127
<artifactId>hadoop-client-runtime</artifactId>
128128
<scope>test</scope>
129129
</dependency>
130+
131+
<dependency>
132+
<groupId>javax.servlet</groupId>
133+
<artifactId>javax.servlet-api</artifactId>
134+
<scope>test</scope>
135+
</dependency>
136+
137+
<dependency>
138+
<groupId>jakarta.servlet</groupId>
139+
<artifactId>jakarta.servlet-api</artifactId>
140+
<scope>test</scope>
141+
</dependency>
130142
</dependencies>
131143

132144
<build>

extensions/spark/kyuubi-spark-lineage/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@
167167
<artifactId>spark-hive_${scala.binary.version}</artifactId>
168168
<scope>test</scope>
169169
</dependency>
170+
171+
<dependency>
172+
<groupId>javax.servlet</groupId>
173+
<artifactId>javax.servlet-api</artifactId>
174+
<scope>test</scope>
175+
</dependency>
176+
177+
<dependency>
178+
<groupId>jakarta.servlet</groupId>
179+
<artifactId>jakarta.servlet-api</artifactId>
180+
<scope>test</scope>
181+
</dependency>
170182
</dependencies>
171183

172184
<build>

externals/kyuubi-spark-sql-engine/pom.xml

+12
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@
6464
<artifactId>grpc-util</artifactId>
6565
</dependency>
6666

67+
<dependency>
68+
<groupId>javax.servlet</groupId>
69+
<artifactId>javax.servlet-api</artifactId>
70+
<scope>provided</scope>
71+
</dependency>
72+
73+
<dependency>
74+
<groupId>jakarta.servlet</groupId>
75+
<artifactId>jakarta.servlet-api</artifactId>
76+
<scope>provided</scope>
77+
</dependency>
78+
6779
<dependency>
6880
<groupId>org.apache.spark</groupId>
6981
<artifactId>spark-sql_${scala.binary.version}</artifactId>

kyuubi-metrics/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
</dependency>
6868

6969
<dependency>
70-
<groupId>jakarta.servlet</groupId>
71-
<artifactId>jakarta.servlet-api</artifactId>
70+
<groupId>javax.servlet</groupId>
71+
<artifactId>javax.servlet-api</artifactId>
7272
</dependency>
7373

7474
<dependency>

kyuubi-rest-client/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
</dependency>
4646

4747
<dependency>
48-
<groupId>jakarta.servlet</groupId>
49-
<artifactId>jakarta.servlet-api</artifactId>
48+
<groupId>javax.servlet</groupId>
49+
<artifactId>javax.servlet-api</artifactId>
5050
</dependency>
5151

5252
<dependency>

kyuubi-server/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@
115115
</dependency>
116116

117117
<dependency>
118-
<groupId>jakarta.servlet</groupId>
119-
<artifactId>jakarta.servlet-api</artifactId>
118+
<groupId>javax.servlet</groupId>
119+
<artifactId>javax.servlet-api</artifactId>
120120
</dependency>
121121

122122
<dependency>

0 commit comments

Comments
 (0)