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

dongjoon-hyun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 5526266  [SPARK-57794] Exclude 3rd party Maven metadata from shadow jar
5526266 is described below

commit 5526266cc8cb5f26b3dfbd268e861e7bc253f570
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue Jun 30 17:43:28 2026 -0700

    [SPARK-57794] Exclude 3rd party Maven metadata from shadow jar
    
    ### What changes were proposed in this pull request?
    
    This PR excludes 3rd party Maven metadata (`META-INF/maven/**`) from the 
`spark-operator` shadow jar.
    
    ### Why are the changes needed?
    
    `minimize()` strips unreachable classes but leaves the matching 
`pom.properties`/`pom.xml` behind, so orphaned Maven metadata remains for 
fully-removed dependencies. These files are build-time only and serve no 
runtime purpose.
    
    For the record, we provide SBOM for trace-ability.
    - #332
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manual test.
    
    **BEFORE**
    ```
    $ gradle build -x test
    $ jar tvf 
spark-operator/build/libs/spark-kubernetes-operator-1.0.0-SNAPSHOT-all.jar | 
grep maven | wc -l
         696
    ```
    
    **AFTER**
    ```
    $ gradle build -x test
    $ jar tvf 
spark-operator/build/libs/spark-kubernetes-operator-1.0.0-SNAPSHOT-all.jar | 
grep maven | wc -l
           0
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 4.8
    
    Closes #722 from dongjoon-hyun/SPARK-57794.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 spark-operator/build.gradle | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/spark-operator/build.gradle b/spark-operator/build.gradle
index 4c0c33a..fd435b5 100644
--- a/spark-operator/build.gradle
+++ b/spark-operator/build.gradle
@@ -94,6 +94,8 @@ shadowJar {
   exclude("org/apache/spark/ui/static/**")
   // Hadoop webapps (HDFS/YARN UI)
   exclude("webapps/**")
+  // Exclude 3rd party metadata to avoid conflicts
+  exclude("META-INF/maven/**")
   // Netty QUIC native libraries - not needed for K8s API server communication 
(HTTP/1.1 & HTTP/2)
   exclude("META-INF/native/libnetty_quiche*")
   exclude("META-INF/native/netty_quiche*")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to