Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#5489] fix(build): Improve the gradle to skip some modules to avoid publishing empty jars (#5501)

Jerry Shao72b92d650838
diff --git a/build.gradle.kts b/build.gradle.kts
index e6c49df406..23074cbe02 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -401,9 +401,17 @@ subprojects {
publishing {
publications {
create<MavenPublication>("MavenJava") {
- from(components["java"])
- artifact(sourcesJar)
- artifact(javadocJar)
+ if (project.name == "web" ||
+ project.name == "docs" ||
+ project.name == "integration-test" ||
+ project.name == "integration-test-common"
+ ) {
+ setArtifacts(emptyList<Any>())
+ } else {
+ from(components["java"])
+ artifact(sourcesJar)
+ artifact(javadocJar)
+ }
pom {
name.set("Gravitino")
diff --git a/dev/release/release-build.sh b/dev/release/release-build.sh
index 45617c76e3..d6ae00038d 100755
--- a/dev/release/release-build.sh
+++ b/dev/release/release-build.sh
@@ -360,7 +360,7 @@ if [[ "$1" == "publish-release" ]]; then
if ! is_dry_run; then
nexus_upload=$NEXUS_ROOT/deployByRepositoryId/$staged_repo_id
echo "Uploading files to $nexus_upload"
- for file in $(find . -type f -not -path "./docs/*" -not -path "./web/*")
+ for file in $(find . -type f -not -path "./docs/*" -not -path "./web/*" -not -path "./integration-test-common/*" -not -path "./integration-test/*")
do
# strip leading ./
file_short=$(echo $file | sed -e "s/\.\///")