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

JingsongLi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-vector-index.git


The following commit(s) were added to refs/heads/main by this push:
     new ef2cd40  [java] Exclude native libraries from sources jar (#50)
ef2cd40 is described below

commit ef2cd40b616ecd00f7e6a95ff7e0e8a86be5eeb6
Author: XiaoHongbo <[email protected]>
AuthorDate: Fri Jun 19 22:25:26 2026 +0800

    [java] Exclude native libraries from sources jar (#50)
    
    The release build downloads the platform native libraries into
    java/src/main/resources/native/ before packaging, and Maven places
    them into the binary jar as intended. However maven-source-plugin
    includes resource directories by default, so the -sources.jar also
    bundled the native .so/.dylib/.dll binaries, making it nearly the
    same size as the binary jar (~29MB) and shipping platform binaries
    in a sources artifact.
---
 java/pom.xml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/java/pom.xml b/java/pom.xml
index a2b7008..345e1fb 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -132,6 +132,15 @@
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-source-plugin</artifactId>
                         <version>3.3.1</version>
+                        <configuration>
+                            <!-- The native libraries are downloaded into
+                                 src/main/resources/native during the release 
build and belong only
+                                 in the binary jar. Exclude them so the 
sources jar contains source
+                                 code (and META-INF metadata), not platform 
binaries. -->
+                            <excludes>
+                                <exclude>native/**</exclude>
+                            </excludes>
+                        </configuration>
                         <executions>
                             <execution>
                                 <id>attach-sources</id>

Reply via email to