You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2023/02/16 11:02:52 UTC

[pulsar] branch master updated: [fix][client] Shade com.fasterxml.jackson.datatype.* to prevent ClassNotFoundException (#19458)

This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new fe547c7b7e1 [fix][client] Shade com.fasterxml.jackson.datatype.* to prevent ClassNotFoundException (#19458)
fe547c7b7e1 is described below

commit fe547c7b7e1d4cb344419cbe37dc2ae771ca630f
Author: Masahiro Sakamoto <ma...@yahoo-corp.jp>
AuthorDate: Thu Feb 16 20:02:44 2023 +0900

    [fix][client] Shade com.fasterxml.jackson.datatype.* to prevent ClassNotFoundException (#19458)
---
 pulsar-client-admin-shaded/pom.xml |  9 +++++++--
 pulsar-client-all/pom.xml          | 12 +++++++-----
 pulsar-client-shaded/pom.xml       | 11 +++++++----
 3 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/pulsar-client-admin-shaded/pom.xml b/pulsar-client-admin-shaded/pom.xml
index c11aaa5b57d..4fca4b1bb25 100644
--- a/pulsar-client-admin-shaded/pom.xml
+++ b/pulsar-client-admin-shaded/pom.xml
@@ -123,7 +123,7 @@
                   <include>com.google.protobuf:protobuf-java</include>
                   <include>com.google.guava:guava</include>
                   <include>com.google.code.gson:gson</include>
-                  <include>com.fasterxml.jackson.core</include>
+                  <include>com.fasterxml.jackson.*:*</include>
                   <include>io.netty:*</include>
                   <include>io.netty.incubator:*</include>
                   <include>org.apache.pulsar:pulsar-common</include>
@@ -133,7 +133,6 @@
                   <include>javax.ws.rs:*</include>
                   <include>jakarta.annotation:*</include>
                   <include>org.glassfish.hk2*:*</include>
-                  <include>com.fasterxml.jackson.*:*</include>
                   <include>io.grpc:*</include>
                   <include>io.perfmark:*</include>
                   <include>com.yahoo.datasketches:*</include>
@@ -150,6 +149,9 @@
                   <!-- Issue #6834, Since Netty ByteBuf shaded, we need also shade this module -->
                   <include>org.apache.pulsar:pulsar-client-messagecrypto-bc</include>
                 </includes>
+                <excludes>
+                  <exclude>com.fasterxml.jackson.core:jackson-annotations</exclude>
+                </excludes>
               </artifactSet>
               <filters>
                 <filter>
@@ -192,6 +194,9 @@
                 <relocation>
                   <pattern>com.fasterxml.jackson</pattern>
                   <shadedPattern>org.apache.pulsar.shade.com.fasterxml.jackson</shadedPattern>
+                  <excludes>
+                    <exclude>com.fasterxml.jackson.annotation.*</exclude>
+                  </excludes>
                 </relocation>
                 <relocation>
                   <pattern>io.netty</pattern>
diff --git a/pulsar-client-all/pom.xml b/pulsar-client-all/pom.xml
index 9a31313d9c8..62f98b8316e 100644
--- a/pulsar-client-all/pom.xml
+++ b/pulsar-client-all/pom.xml
@@ -151,10 +151,7 @@
                   <include>com.google.errorprone:*</include>
                   <include>com.google.j2objc:*</include>
                   <include>com.google.code.gson:gson</include>
-                  <include>com.fasterxml.jackson.core</include>
-                  <include>com.fasterxml.jackson.module</include>
-                  <include>com.fasterxml.jackson.core:jackson-core</include>
-                  <include>com.fasterxml.jackson.dataformat</include>
+                  <include>com.fasterxml.jackson.*:*</include>
                   <include>io.netty:netty</include>
                   <include>io.netty:netty-all</include>
                   <include>io.netty:netty-tcnative-boringssl-static</include>
@@ -171,7 +168,6 @@
                   <include>javax.ws.rs:*</include>
                   <include>jakarta.annotation:*</include>
                   <include>org.glassfish.hk2*:*</include>
-                  <include>com.fasterxml.jackson.*:*</include>
                   <include>io.grpc:*</include>
                   <include>io.perfmark:*</include>
                   <include>com.yahoo.datasketches:*</include>
@@ -194,6 +190,9 @@
                   <!-- Issue #6834, Since Netty ByteBuf shaded, we need also shade this module -->
                   <include>org.apache.pulsar:pulsar-client-messagecrypto-bc</include>
                 </includes>
+                <excludes>
+                  <exclude>com.fasterxml.jackson.core:jackson-annotations</exclude>
+                </excludes>
               </artifactSet>
               <filters>
                 <filter>
@@ -230,6 +229,9 @@
                 <relocation>
                   <pattern>com.fasterxml.jackson</pattern>
                   <shadedPattern>org.apache.pulsar.shade.com.fasterxml.jackson</shadedPattern>
+                  <excludes>
+                    <exclude>com.fasterxml.jackson.annotation.*</exclude>
+                  </excludes>
                 </relocation>
                 <relocation>
                   <pattern>io.netty</pattern>
diff --git a/pulsar-client-shaded/pom.xml b/pulsar-client-shaded/pom.xml
index fc87b98371b..ce5e6acf152 100644
--- a/pulsar-client-shaded/pom.xml
+++ b/pulsar-client-shaded/pom.xml
@@ -145,10 +145,7 @@
                   <include>com.google.errorprone:*</include>
                   <include>com.google.j2objc:*</include>
                   <include>com.google.code.gson:gson</include>
-                  <include>com.fasterxml.jackson.core</include>
-                  <include>com.fasterxml.jackson.module</include>
-                  <include>com.fasterxml.jackson.core:jackson-core</include>
-                  <include>com.fasterxml.jackson.dataformat</include>
+                  <include>com.fasterxml.jackson.*:*</include>
                   <include>io.netty:*</include>
                   <include>io.netty.incubator:*</include>
                   <include>io.perfmark:*</include>
@@ -171,6 +168,9 @@
                   <!-- Issue #6834, Since Netty ByteBuf shaded, we need also shade this module -->
                   <include>org.apache.pulsar:pulsar-client-messagecrypto-bc</include>
                 </includes>
+                <excludes>
+                  <exclude>com.fasterxml.jackson.core:jackson-annotations</exclude>
+                </excludes>
               </artifactSet>
               <filters>
                 <filter>
@@ -207,6 +207,9 @@
                 <relocation>
                   <pattern>com.fasterxml.jackson</pattern>
                   <shadedPattern>org.apache.pulsar.shade.com.fasterxml.jackson</shadedPattern>
+                  <excludes>
+                    <exclude>com.fasterxml.jackson.annotation.*</exclude>
+                  </excludes>
                 </relocation>
                 <relocation>
                   <pattern>io.netty</pattern>