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

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


The following commit(s) were added to refs/heads/master by this push:
     new d7d00aba143d fix(build): publish dependency-reduced POMs for shaded 
bundles (#19433)
d7d00aba143d is described below

commit d7d00aba143df339f78468736086b16b92eae3df
Author: Ranga Reddy <[email protected]>
AuthorDate: Mon Aug 3 11:51:57 2026 +0530

    fix(build): publish dependency-reduced POMs for shaded bundles (#19433)
    
    * fix(build): publish dependency-reduced POMs for shaded bundles
    
    Seven bundles set createDependencyReducedPom=false while also configuring
    dependencyReducedPomLocation, so the POM published to Maven Central still
    declared the artifacts that were shaded into the jar. Consumers therefore
    inherited those artifacts as transitive dependencies even though the classes
    were already inside the bundle (and relocated, so the transitive copies are
    not the ones the bundle uses).
    
    For hudi-aws-bundle the published POM listed hudi-aws, hudi-hive-sync,
    httpclient and httpcore, all of which are in the bundle's artifactSet.
    Enabling the reduced POM drops exactly those and keeps hudi-common and
    parquet-avro, which are not bundled and are genuinely required at runtime.
    
    Closes #16407
    
    * fix(build): keep presto shade inputs and non-bundled transitives after 
POM reduction
    
    Addresses review feedback on the dependency-reduced POM change.
    
    hudi-presto-bundle shades org.apache.hudi:hudi-hadoop-common and
    org.apache.hudi:hudi-hadoop-mr but declared neither, reaching both only 
through
    hudi-hadoop-mr-bundle. Reducing that bundle's POM to zero dependencies made 
both
    includes match nothing, and shade does not fail on an unmatched include. 
Verified
    by installing the reduced POM and building the presto bundle without -am: 
the jar
    went from 109 org/apache/hudi/hadoop/** entries to 0, losing
    HoodieParquetInputFormat. Declaring both directly restores 109 and stops 
this
    bundle's shade inputs depending on another bundle's published dependency 
list.
    
    promoteTransitiveDependencies defaults to false, so reduction also removed
    artifacts that arrived only through a removed dependency and are not in the
    shaded jar. Setting it to true on all seven bundles keeps them: the
    hudi-hadoop-mr-bundle reduced POM goes from 0 to 79 dependencies, restoring
    orc-core, rocksdbjni, jetty, dropwizard metrics, simpleclient, lz4-java,
    disruptor and jaxb-api among others.
    
    All seven bundles build and emit a reduced POM.
---
 packaging/hudi-aws-bundle/pom.xml          |  5 ++++-
 packaging/hudi-azure-bundle/pom.xml        |  5 ++++-
 packaging/hudi-datahub-sync-bundle/pom.xml |  5 ++++-
 packaging/hudi-gcp-bundle/pom.xml          |  5 ++++-
 packaging/hudi-hadoop-mr-bundle/pom.xml    |  5 ++++-
 packaging/hudi-hive-sync-bundle/pom.xml    |  5 ++++-
 packaging/hudi-presto-bundle/pom.xml       | 18 +++++++++++++++++-
 7 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/packaging/hudi-aws-bundle/pom.xml 
b/packaging/hudi-aws-bundle/pom.xml
index 8cb02d03be7b..74bc4f71fba0 100644
--- a/packaging/hudi-aws-bundle/pom.xml
+++ b/packaging/hudi-aws-bundle/pom.xml
@@ -117,7 +117,10 @@
                                     
<shadedPattern>org.apache.hudi.aws.org.apache.httpcomponents.</shadedPattern>
                                 </relocation>
                             </relocations>
-                            
<createDependencyReducedPom>false</createDependencyReducedPom>
+                            
<createDependencyReducedPom>true</createDependencyReducedPom>
+                            <!-- Keep dependencies that are not absorbed into 
the shaded jar, so the reduced POM still
+                                 declares what consumers need at runtime. -->
+                            
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                             <filters>
                                 <filter>
                                     <artifact>*:*</artifact>
diff --git a/packaging/hudi-azure-bundle/pom.xml 
b/packaging/hudi-azure-bundle/pom.xml
index 20109215279d..b778ce8d2331 100644
--- a/packaging/hudi-azure-bundle/pom.xml
+++ b/packaging/hudi-azure-bundle/pom.xml
@@ -132,7 +132,10 @@
                   
<shadedPattern>org.apache.hudi.org.reactivestreams.</shadedPattern>
                 </relocation>
               </relocations>
-              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <createDependencyReducedPom>true</createDependencyReducedPom>
+              <!-- Keep dependencies that are not absorbed into the shaded 
jar, so the reduced POM still
+                   declares what consumers need at runtime. -->
+              
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
               <filters>
                 <filter>
                   <artifact>*:*</artifact>
diff --git a/packaging/hudi-datahub-sync-bundle/pom.xml 
b/packaging/hudi-datahub-sync-bundle/pom.xml
index c2d6ae0702cf..8e3a514db634 100644
--- a/packaging/hudi-datahub-sync-bundle/pom.xml
+++ b/packaging/hudi-datahub-sync-bundle/pom.xml
@@ -91,7 +91,10 @@
                   
<shadedPattern>org.apache.hudi.org.openjdk.jol.</shadedPattern>
                 </relocation>
               </relocations>
-              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <createDependencyReducedPom>true</createDependencyReducedPom>
+              <!-- Keep dependencies that are not absorbed into the shaded 
jar, so the reduced POM still
+                   declares what consumers need at runtime. -->
+              
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
               <filters>
                 <filter>
                   <artifact>*:*</artifact>
diff --git a/packaging/hudi-gcp-bundle/pom.xml 
b/packaging/hudi-gcp-bundle/pom.xml
index a834ee27ee91..56acba798e04 100644
--- a/packaging/hudi-gcp-bundle/pom.xml
+++ b/packaging/hudi-gcp-bundle/pom.xml
@@ -115,7 +115,10 @@
                   
<shadedPattern>org.apache.hudi.org.openjdk.jol.</shadedPattern>
                 </relocation>
               </relocations>
-              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <createDependencyReducedPom>true</createDependencyReducedPom>
+              <!-- Keep dependencies that are not absorbed into the shaded 
jar, so the reduced POM still
+                   declares what consumers need at runtime. -->
+              
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
               <filters>
                 <filter>
                   <artifact>*:*</artifact>
diff --git a/packaging/hudi-hadoop-mr-bundle/pom.xml 
b/packaging/hudi-hadoop-mr-bundle/pom.xml
index 1ad9724e49ca..1a52f7e76b8b 100644
--- a/packaging/hudi-hadoop-mr-bundle/pom.xml
+++ b/packaging/hudi-hadoop-mr-bundle/pom.xml
@@ -136,7 +136,10 @@
                   
<shadedPattern>org.apache.hudi.com.fasterxml.jackson.</shadedPattern>
                 </relocation>
               </relocations>
-              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <createDependencyReducedPom>true</createDependencyReducedPom>
+              <!-- Keep dependencies that are not absorbed into the shaded 
jar, so the reduced POM still
+                   declares what consumers need at runtime. -->
+              
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
               <filters>
                 <filter>
                   <artifact>*:*</artifact>
diff --git a/packaging/hudi-hive-sync-bundle/pom.xml 
b/packaging/hudi-hive-sync-bundle/pom.xml
index e143d37d97a4..0ea90c287ee6 100644
--- a/packaging/hudi-hive-sync-bundle/pom.xml
+++ b/packaging/hudi-hive-sync-bundle/pom.xml
@@ -123,7 +123,10 @@
                   <shadedPattern>org.apache.hudi.org.objenesis.</shadedPattern>
                 </relocation>
               </relocations>
-              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <createDependencyReducedPom>true</createDependencyReducedPom>
+              <!-- Keep dependencies that are not absorbed into the shaded 
jar, so the reduced POM still
+                   declares what consumers need at runtime. -->
+              
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
               <filters>
                 <filter>
                   <artifact>*:*</artifact>
diff --git a/packaging/hudi-presto-bundle/pom.xml 
b/packaging/hudi-presto-bundle/pom.xml
index d4f15e5eb5f1..e5b03a6ccc9c 100644
--- a/packaging/hudi-presto-bundle/pom.xml
+++ b/packaging/hudi-presto-bundle/pom.xml
@@ -141,7 +141,10 @@
                   
<shadedPattern>org.apache.hudi.org.openjdk.jol.</shadedPattern>
                 </relocation>
               </relocations>
-              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <createDependencyReducedPom>true</createDependencyReducedPom>
+              <!-- Keep dependencies that are not absorbed into the shaded 
jar, so the reduced POM still
+                   declares what consumers need at runtime. -->
+              
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
               <filters>
                 <filter>
                   <artifact>*:*</artifact>
@@ -193,6 +196,19 @@
       <artifactId>hudi-hadoop-mr-bundle</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <!-- Both are shaded in by the artifactSet above. Declared directly rather 
than relying on
+         hudi-hadoop-mr-bundle to supply them transitively, so this bundle's 
shade inputs do not depend
+         on another bundle's published dependency list. -->
+    <dependency>
+      <groupId>org.apache.hudi</groupId>
+      <artifactId>hudi-hadoop-mr</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hudi</groupId>
+      <artifactId>hudi-hadoop-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
 
     <!-- Kryo -->
     <dependency>

Reply via email to