From 2d0c916c7e13fbc5c70280272b5881246e7a47d9 Mon Sep 17 00:00:00 2001 From: John Mazanec Date: Wed, 26 Oct 2022 13:40:35 -0700 Subject: [PATCH 1/3] Update build to publish to maven local Updates build script to publish zip to local maven. This allows plugins like neural search to pick up the zip as a dependency. Fixes bug in build script where group was being set to org.opensearch as opposed to org.opensearch.plugin. Signed-off-by: John Mazanec --- build.gradle | 2 +- scripts/build.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 76ef1c144..e2f245f72 100644 --- a/build.gradle +++ b/build.gradle @@ -53,7 +53,7 @@ ext { allprojects { - group = 'org.opensearch' + group = 'org.opensearch.plugin' version = opensearch_version.tokenize('-')[0] + '.0' if (version_qualifier) { version += "-${version_qualifier}" diff --git a/scripts/build.sh b/scripts/build.sh index 2ff2bc2b6..2d9677d3d 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -101,6 +101,7 @@ make opensearchknn_faiss opensearchknn_nmslib cd $work_dir ./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER ./gradlew publishPluginZipPublicationToZipStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER +./gradlew :publishToMavenLocal -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER # Add lib to zip zipPath=$(find "$(pwd)" -path \*build/distributions/*.zip) From b0ae128c8d36dfe6f504f19705617219e6bbb10c Mon Sep 17 00:00:00 2001 From: John Mazanec Date: Wed, 26 Oct 2022 16:58:54 -0700 Subject: [PATCH 2/3] Switch to use publishPluginZipPublicationToMavenLocal Signed-off-by: John Mazanec --- build.gradle | 2 +- scripts/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e2f245f72..76ef1c144 100644 --- a/build.gradle +++ b/build.gradle @@ -53,7 +53,7 @@ ext { allprojects { - group = 'org.opensearch.plugin' + group = 'org.opensearch' version = opensearch_version.tokenize('-')[0] + '.0' if (version_qualifier) { version += "-${version_qualifier}" diff --git a/scripts/build.sh b/scripts/build.sh index 2d9677d3d..67c74aa76 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -101,7 +101,7 @@ make opensearchknn_faiss opensearchknn_nmslib cd $work_dir ./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER ./gradlew publishPluginZipPublicationToZipStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER -./gradlew :publishToMavenLocal -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER +./gradlew publishPluginZipPublicationToMavenLocal -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER # Add lib to zip zipPath=$(find "$(pwd)" -path \*build/distributions/*.zip) From 2a30817d3e5036ad869837ce6b356376f4692562 Mon Sep 17 00:00:00 2001 From: John Mazanec Date: Wed, 26 Oct 2022 17:11:58 -0700 Subject: [PATCH 3/3] Add opensearch version to publishZip Signed-off-by: John Mazanec --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 67c74aa76..b19950041 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -101,7 +101,7 @@ make opensearchknn_faiss opensearchknn_nmslib cd $work_dir ./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER ./gradlew publishPluginZipPublicationToZipStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER -./gradlew publishPluginZipPublicationToMavenLocal -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER +./gradlew publishPluginZipPublicationToMavenLocal -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER -Dopensearch.version=$VERSION # Add lib to zip zipPath=$(find "$(pwd)" -path \*build/distributions/*.zip)