From 046bc8c0d6e30842e42c02dff87d2ebe6557287d Mon Sep 17 00:00:00 2001 From: pgodithi Date: Mon, 2 May 2022 21:42:50 -0400 Subject: [PATCH 1/8] Addec opensearch.pluginzip plugin Signed-off-by: pgodithi --- .github/workflows/CI.yml | 1 + build.gradle | 3 ++- settings.gradle | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f260ced..f6513e7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,3 +30,4 @@ jobs: - name: Build and Run Tests run: | ./gradlew build + ./gradlew help --task publishPluginZipPublicationToZipStagingRepository diff --git a/build.gradle b/build.gradle index b4ba721..a1eec7e 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ apply plugin: 'java' apply plugin: 'idea' apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' +apply plugin: 'opensearch.pluginzip' def pluginName = 'rename' def pluginDescription = 'Custom plugin' @@ -37,7 +38,7 @@ validateNebulaPom.enabled = false buildscript { ext { - opensearch_version = "2.0.0-SNAPSHOT" + opensearch_version = "2.0.0-alpha1-SNAPSHOT" } repositories { diff --git a/settings.gradle b/settings.gradle index 6f5da74..72b3837 100644 --- a/settings.gradle +++ b/settings.gradle @@ -8,3 +8,4 @@ */ rootProject.name = 'plugin-template' +startParameter.excludedTaskNames=["validatePluginZipPom"] From 7e5f4ac4522634efbda7fb2a42c2855b2fb986c9 Mon Sep 17 00:00:00 2001 From: pgodithi Date: Mon, 2 May 2022 21:54:35 -0400 Subject: [PATCH 2/8] Added 2.0.0-rc1-SNAPSHOT Signed-off-by: pgodithi --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a1eec7e..946309f 100644 --- a/build.gradle +++ b/build.gradle @@ -38,7 +38,7 @@ validateNebulaPom.enabled = false buildscript { ext { - opensearch_version = "2.0.0-alpha1-SNAPSHOT" + opensearch_version = "2.0.0-rc1-SNAPSHOT" } repositories { From c0f619232d992fb99645c7418f8baf1b161120fd Mon Sep 17 00:00:00 2001 From: pgodithi Date: Tue, 3 May 2022 08:52:23 -0400 Subject: [PATCH 3/8] Added publishPluginZipPublicationToZipStagingRepository Signed-off-by: pgodithi --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f6513e7..17cffc4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,6 +28,7 @@ jobs: java-version: ${{ matrix.java }} - name: Build and Run Tests + # The following publishPluginZipPublicationToZipStagingRepository task is generated by 'opensearch.pluginzip' custom gradle plugin run: | ./gradlew build - ./gradlew help --task publishPluginZipPublicationToZipStagingRepository + ./gradlew publishPluginZipPublicationToZipStagingRepository From ddeb3dbeb8617a479d3aef9e3dec9b268d437fe1 Mon Sep 17 00:00:00 2001 From: pgodithi Date: Wed, 4 May 2022 05:56:41 -0400 Subject: [PATCH 4/8] fixed NIT's Signed-off-by: pgodithi --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 17cffc4..a22d69c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,7 +28,7 @@ jobs: java-version: ${{ matrix.java }} - name: Build and Run Tests - # The following publishPluginZipPublicationToZipStagingRepository task is generated by 'opensearch.pluginzip' custom gradle plugin run: | ./gradlew build + # Generated by 'opensearch.pluginzip' custom gradle plugin ./gradlew publishPluginZipPublicationToZipStagingRepository From dcb899d6655ba66d0ed98c6aec1c5db99a812428 Mon Sep 17 00:00:00 2001 From: pgodithi Date: Wed, 4 May 2022 17:33:40 -0400 Subject: [PATCH 5/8] Add implicit dependency Signed-off-by: pgodithi --- build.gradle | 22 ++++++++++++++++++++++ settings.gradle | 1 - 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 946309f..c778032 100644 --- a/build.gradle +++ b/build.gradle @@ -22,6 +22,28 @@ tasks.register("preparePluginPathDirs") { } } +allprojects { + project.ext.licenseName = 'The Apache Software License, Version 2.0' + project.ext.licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + publishing { + publications { + all { + pom.withXml { XmlProvider xml -> + Node node = xml.asNode() + node.appendNode('inceptionYear', '2022') + node.appendNode('name', 'rename') + node.appendNode('description', 'Custom plugin') + Node license = node.appendNode('licenses').appendNode('license') + license.appendNode('name', project.licenseName) + license.appendNode('url', project.licenseUrl) + Node developer = node.appendNode('developers').appendNode('developer') + developer.appendNode('name', 'OpenSearch') + developer.appendNode('url', 'https://github.com/opensearch-project/opensearch-plugin-template-java') + } + } + } + } +} opensearchplugin { name pluginName description pluginDescription diff --git a/settings.gradle b/settings.gradle index 72b3837..6f5da74 100644 --- a/settings.gradle +++ b/settings.gradle @@ -8,4 +8,3 @@ */ rootProject.name = 'plugin-template' -startParameter.excludedTaskNames=["validatePluginZipPom"] From 4aa4a583914269e9e1b0f1220d04e944caf34ee5 Mon Sep 17 00:00:00 2001 From: pgodithi Date: Tue, 10 May 2022 12:37:29 -0400 Subject: [PATCH 6/8] added POM Signed-off-by: pgodithi --- build.gradle | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index c778032..2bccfb3 100644 --- a/build.gradle +++ b/build.gradle @@ -22,24 +22,24 @@ tasks.register("preparePluginPathDirs") { } } -allprojects { - project.ext.licenseName = 'The Apache Software License, Version 2.0' - project.ext.licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - publishing { - publications { - all { - pom.withXml { XmlProvider xml -> - Node node = xml.asNode() - node.appendNode('inceptionYear', '2022') - node.appendNode('name', 'rename') - node.appendNode('description', 'Custom plugin') - Node license = node.appendNode('licenses').appendNode('license') - license.appendNode('name', project.licenseName) - license.appendNode('url', project.licenseUrl) - Node developer = node.appendNode('developers').appendNode('developer') - developer.appendNode('name', 'OpenSearch') - developer.appendNode('url', 'https://github.com/opensearch-project/opensearch-plugin-template-java') +publishing { + publications { + pluginZip(MavenPublication) { publication -> + pom { + name = pluginName + description = pluginDescription + licenses { + license { + name = "The Apache License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" } + } + developers { + developer { + name = "OpenSearch" + url = "https://github.com/opensearch-project/opensearch-plugin-template-java" + } + } } } } From 7674ea8b859f62979a983a8b36b20e60a5b70bec Mon Sep 17 00:00:00 2001 From: pgodithi Date: Tue, 10 May 2022 12:50:51 -0400 Subject: [PATCH 7/8] Added 3.0.0-SNAPSHOT Signed-off-by: pgodithi --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2bccfb3..00b09cb 100644 --- a/build.gradle +++ b/build.gradle @@ -60,7 +60,7 @@ validateNebulaPom.enabled = false buildscript { ext { - opensearch_version = "2.0.0-rc1-SNAPSHOT" + opensearch_version = "3.0.0-SNAPSHOT" } repositories { From d8a7ee5ad37fdb92be5f7e5d403644eea8b7ebae Mon Sep 17 00:00:00 2001 From: pgodithi Date: Tue, 10 May 2022 15:47:28 -0400 Subject: [PATCH 8/8] Updated OS version Signed-off-by: pgodithi --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 00b09cb..2213f02 100644 --- a/build.gradle +++ b/build.gradle @@ -60,7 +60,7 @@ validateNebulaPom.enabled = false buildscript { ext { - opensearch_version = "3.0.0-SNAPSHOT" + opensearch_version = "2.0.0-SNAPSHOT" } repositories {