Skip to content

Commit bd93277

Browse files
committed
[improve][client] Reduce unshaded dependencies and shading warnings in shaded Java client modules (#23647)
(cherry picked from commit 429f7de)
1 parent f869c8b commit bd93277

File tree

23 files changed

+580
-381
lines changed

23 files changed

+580
-381
lines changed

distribution/server/src/assemble/LICENSE.bin.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,8 @@ Protocol Buffers License
571571
CDDL-1.1 -- ../licenses/LICENSE-CDDL-1.1.txt
572572
* Java Annotations API
573573
- com.sun.activation-javax.activation-1.2.0.jar
574-
- javax.xml.bind-jaxb-api-2.3.1.jar
575574
* Java Servlet API -- javax.servlet-javax.servlet-api-3.1.0.jar
576575
* WebSocket Server API -- javax.websocket-javax.websocket-client-api-1.0.jar
577-
* Java Web Service REST API -- javax.ws.rs-javax.ws.rs-api-2.1.jar
578576
* HK2 - Dependency Injection Kernel
579577
- org.glassfish.hk2-hk2-api-2.6.1.jar
580578
- org.glassfish.hk2-hk2-locator-2.6.1.jar

distribution/shell/src/assemble/LICENSE.bin.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,8 @@ MIT License
431431

432432
CDDL-1.1 -- ../licenses/LICENSE-CDDL-1.1.txt
433433
* Java Annotations API
434-
- javax.annotation-api-1.3.2.jar
435434
- javax.activation-1.2.0.jar
436-
- jaxb-api-2.3.1.jar
437435
* WebSocket Server API -- javax.websocket-client-api-1.0.jar
438-
* Java Web Service REST API -- javax.ws.rs-api-2.1.jar
439436
* HK2 - Dependency Injection Kernel
440437
- hk2-api-2.6.1.jar
441438
- hk2-locator-2.6.1.jar

jetcd-core-shaded/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
<groupId>io.netty</groupId>
4646
<artifactId>*</artifactId>
4747
</exclusion>
48+
<exclusion>
49+
<groupId>javax.annotation</groupId>
50+
<artifactId>javax.annotation-api</artifactId>
51+
</exclusion>
4852
</exclusions>
4953
</dependency>
5054
<dependency>

pom.xml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ flexible messaging model and an intuitive client API.</description>
220220
<commons-configuration.version>1.10</commons-configuration.version>
221221
<commons-io.version>2.14.0</commons-io.version>
222222
<commons-codec.version>1.15</commons-codec.version>
223-
<javax.ws.rs-api.version>2.1</javax.ws.rs-api.version>
223+
<jakarta.ws.rs-api.version>2.1.6</jakarta.ws.rs-api.version>
224224
<hdrHistogram.version>2.1.9</hdrHistogram.version>
225225
<javax.servlet-api>3.1.0</javax.servlet-api>
226226
<caffeine.version>2.9.1</caffeine.version>
@@ -231,7 +231,7 @@ flexible messaging model and an intuitive client API.</description>
231231
<spark-streaming_2.10.version>2.1.0</spark-streaming_2.10.version>
232232
<assertj-core.version>3.24.2</assertj-core.version>
233233
<lombok.version>1.18.32</lombok.version>
234-
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
234+
<jakarta.annotation-api.version>1.3.5</jakarta.annotation-api.version>
235235
<jaxb-api>2.3.1</jaxb-api>
236236
<javax.activation.version>1.2.0</javax.activation.version>
237237
<jakarta.activation.version>1.2.2</jakarta.activation.version>
@@ -854,9 +854,9 @@ flexible messaging model and an intuitive client API.</description>
854854
</dependency>
855855

856856
<dependency>
857-
<groupId>javax.ws.rs</groupId>
858-
<artifactId>javax.ws.rs-api</artifactId>
859-
<version>${javax.ws.rs-api.version}</version>
857+
<groupId>jakarta.ws.rs</groupId>
858+
<artifactId>jakarta.ws.rs-api</artifactId>
859+
<version>${jakarta.ws.rs-api.version}</version>
860860
</dependency>
861861

862862
<dependency>
@@ -990,6 +990,12 @@ flexible messaging model and an intuitive client API.</description>
990990
<groupId>com.yahoo.athenz</groupId>
991991
<artifactId>athenz-zts-java-client-core</artifactId>
992992
<version>${athenz.version}</version>
993+
<exclusions>
994+
<exclusion>
995+
<groupId>javax.ws.rs</groupId>
996+
<artifactId>javax.ws.rs-api</artifactId>
997+
</exclusion>
998+
</exclusions>
993999
</dependency>
9941000

9951001
<dependency>
@@ -1418,9 +1424,9 @@ flexible messaging model and an intuitive client API.</description>
14181424
</dependency>
14191425

14201426
<dependency>
1421-
<groupId>javax.annotation</groupId>
1422-
<artifactId>javax.annotation-api</artifactId>
1423-
<version>${javax.annotation-api.version}</version>
1427+
<groupId>jakarta.annotation</groupId>
1428+
<artifactId>jakarta.annotation-api</artifactId>
1429+
<version>${jakarta.annotation-api.version}</version>
14241430
</dependency>
14251431

14261432
<dependency>
@@ -1723,11 +1729,6 @@ flexible messaging model and an intuitive client API.</description>
17231729
<artifactId>lombok</artifactId>
17241730
<scope>provided</scope>
17251731
</dependency>
1726-
<dependency>
1727-
<groupId>javax.annotation</groupId>
1728-
<artifactId>javax.annotation-api</artifactId>
1729-
<scope>provided</scope>
1730-
</dependency>
17311732

17321733
<dependency>
17331734
<!-- We use MockedBookKeeper in many unit tests -->
@@ -2003,6 +2004,9 @@ flexible messaging model and an intuitive client API.</description>
20032004
<exclude>src/assemble/LICENSE.bin.txt</exclude>
20042005
<exclude>src/assemble/NOTICE.bin.txt</exclude>
20052006

2007+
<!-- exclude services files -->
2008+
<exclude>**/META-INF/services/*</exclude>
2009+
20062010
<!-- These files are generated automatically by the Protobuf compiler
20072011
and are included in source tree for convenience -->
20082012
<exclude>src/main/java/org/apache/bookkeeper/mledger/proto/MLDataFormats.java</exclude>

pulsar-broker-auth-oidc/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@
9595
<artifactId>bcprov-jdk18on</artifactId>
9696
<groupId>org.bouncycastle</groupId>
9797
</exclusion>
98+
<exclusion>
99+
<groupId>javax.annotation</groupId>
100+
<artifactId>javax.annotation-api</artifactId>
101+
</exclusion>
98102
</exclusions>
99103
</dependency>
100104

pulsar-broker-common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
</dependency>
6161

6262
<dependency>
63-
<groupId>javax.ws.rs</groupId>
64-
<artifactId>javax.ws.rs-api</artifactId>
63+
<groupId>jakarta.ws.rs</groupId>
64+
<artifactId>jakarta.ws.rs-api</artifactId>
6565
</dependency>
6666

6767
<dependency>

pulsar-broker/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@
446446
</dependency>
447447

448448
<dependency>
449-
<groupId>javax.xml.bind</groupId>
450-
<artifactId>jaxb-api</artifactId>
449+
<groupId>jakarta.xml.bind</groupId>
450+
<artifactId>jakarta.xml.bind-api</artifactId>
451451
<exclusions>
452452
<exclusion>
453453
<groupId>javax.activation</groupId>

0 commit comments

Comments
 (0)