You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2022/07/25 13:14:45 UTC

[pulsar] branch master updated: add artifactSet to pom.xml for pulsar-functions-local-runner (#16565)

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

technoboy 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 52d8fe03160 add artifactSet to pom.xml for pulsar-functions-local-runner (#16565)
52d8fe03160 is described below

commit 52d8fe03160648f14dc196edaa87921064a1b2b2
Author: Bonan Hou <bo...@streamnative.io>
AuthorDate: Mon Jul 25 21:14:39 2022 +0800

    add artifactSet to pom.xml for pulsar-functions-local-runner (#16565)
---
 pulsar-functions/localrun-shaded/pom.xml | 66 +++++++++++++++++++++++++++-----
 1 file changed, 56 insertions(+), 10 deletions(-)

diff --git a/pulsar-functions/localrun-shaded/pom.xml b/pulsar-functions/localrun-shaded/pom.xml
index a0f5894a4e5..f3585e6c1e6 100644
--- a/pulsar-functions/localrun-shaded/pom.xml
+++ b/pulsar-functions/localrun-shaded/pom.xml
@@ -83,7 +83,7 @@
                             <target>
                                 <!-- shade the AsyncHttpClient ahc-default.properties files -->
                                 <replace token= "org.asynchttpclient."
-                                         value="org.apache.pulsar.shade.org.asynchttpclient."
+                                         value="org.apache.pulsar.functions.runtime.shaded.org.asynchttpclient."
                                          file="${project.build.directory}/classes/org/asynchttpclient/config/ahc-default.properties"/>
                             </target>
                         </configuration>
@@ -106,6 +106,40 @@
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer" />
                             </transformers>
+                            <artifactSet>
+                                <includes>
+                                    <include>org.apache.pulsar:*</include>
+                                    <include>org.apache.bookkeeper:*</include>
+                                    <include>commons-*:*</include>
+                                    <include>org.apache.commons:*</include>
+                                    <include>com.fasterxml.jackson.*:*</include>
+                                    <include>io.netty:*</include>
+                                    <include>com.google.*:*</include>
+                                    <include>javax.servlet:*</include>
+                                    <include>org.reactivestreams:reactive-streams</include>
+                                    <include>org.apache.commons:*</include>
+                                    <include>io.swagger:*</include>
+                                    <include>org.yaml:snakeyaml</include>
+                                    <include>io.perfmark:*</include>
+                                    <include>io.prometheus:*</include>
+                                    <include>io.prometheus.jmx:*</include>
+                                    <include>javax.ws.rs:*</include>
+                                    <include>org.tukaani:xz</include>
+                                    <include>com.github.zafarkhaja:java-semver</include>
+                                    <include>net.java.dev.jna:*</include>
+                                    <include>org.apache.zookeeper:*</include>
+                                    <include>com.thoughtworks.paranamer:paranamer</include>
+                                    <include>jline:*</include>
+                                    <include>org.rocksdb:*</include>
+                                    <include>org.eclipse.jetty*:*</include>
+                                    <include>org.apache.avro:avro</include>
+                                    <include>com.beust:*</include>
+                                    <include>net.jodah:*</include>
+                                    <include>io.airlift:*</include>
+                                    <include>com.yahoo.datasketches:*</include>
+                                    <include>io.netty.resolver:*</include>
+                                </includes>
+                            </artifactSet>
                             <filters>
                                 <filter>
                                     <artifact>org.apache.pulsar:pulsar-client-original</artifact>
@@ -217,10 +251,10 @@
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.apache.distributedlog</shadedPattern>
                                 </relocation>
                                 <!-- Jackson cannot be shaded, this is causing java.lang.NoSuchMethodError when calling getThreadLocalYaml-->
-                                <!-- <relocation>
+                                <relocation>
                                     <pattern>com.fasterxml</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.fasterxml</shadedPattern>
-                                </relocation> -->
+                                </relocation>
                                 <relocation>
                                     <pattern>org.inferred</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.inferred</shadedPattern>
@@ -238,10 +272,10 @@
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.dlshade</shadedPattern>
                                 </relocation>
                                 <!-- This refers to an older version of Jackson -->
-                                <!-- <relocation>
+                                <relocation>
                                     <pattern>org.codehaus.jackson</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.codehaus.jackson</shadedPattern>
-                                </relocation> -->
+                                </relocation>
                                 <relocation>
                                     <pattern>net.java.dev.jna</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.net.java.dev.jna</shadedPattern>
@@ -262,6 +296,10 @@
                                     <pattern>io.prometheus</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.io.prometheus</shadedPattern>
                                 </relocation>
+                                <relocation>
+                                    <pattern>io.prometheus.jmx</pattern>
+                                    <shadedPattern>org.apache.pulsar.functions.runtime.shaded.io.prometheus.jmx</shadedPattern>
+                                </relocation>
                                 <relocation>
                                     <pattern>org.apache.zookeeper</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.apache.zookeeper</shadedPattern>
@@ -339,18 +377,22 @@
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.avo.shaded</shadedPattern>
                                 </relocation>
                                 <relocation>
-                                    <pattern>com.yahoo</pattern>
-                                    <shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.yahoo</shadedPattern>
+                                    <pattern>com.yahoo.datasketches</pattern>
+                                    <shadedPattern>org.apache.pulsar.shaded.com.yahoo.datasketches</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>com.yahoo.sketches</pattern>
+                                    <shadedPattern>org.apache.pulsar.shaded.com.yahoo.sketches</shadedPattern>
                                 </relocation>
                                 <relocation>
                                     <pattern>com.beust</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.com.beust</shadedPattern>
                                 </relocation>
                                 <!-- Netty cannot be shaded, this is causing java.lang.NoSuchMethodError -->
-                                <!-- <relocation>
+                                <relocation>
                                     <pattern>io.netty</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.io.netty</shadedPattern>
-                                </relocation> -->
+                                </relocation>
                                 <relocation>
                                     <pattern>org.hamcrest</pattern>
                                     <shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.hamcrest</shadedPattern>
@@ -374,7 +416,11 @@
                                 -->
                                 <relocation>
                                     <pattern>org.asynchttpclient</pattern>
-                                    <shadedPattern>org.apache.pulsar.shade.org.asynchttpclient</shadedPattern>
+                                    <shadedPattern>org.apache.pulsar.functions.runtime.shaded.org.asynchttpclient</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>io.airlift</pattern>
+                                    <shadedPattern>org.apache.pulsar.functions.runtime.shaded.io.airlift</shadedPattern>
                                 </relocation>
                                 <!-- DONT ever shade log4j, otherwise logging won't work anymore in running functions in process mode
                                 <relocation>