diff --git a/build.gradle b/build.gradle index 424c03b5..0ef04c0c 100644 --- a/build.gradle +++ b/build.gradle @@ -80,6 +80,7 @@ allprojects { } apply plugin: 'opensearch.opensearchplugin' +apply plugin: 'opensearch.pluginzip' licenseFile = rootProject.file('LICENSE.txt') noticeFile = rootProject.file('NOTICE.txt') @@ -144,6 +145,29 @@ project.afterEvaluate { compileJava.options.compilerArgs.removeAll(['--release', version]) } +publishing { + publications { + pluginZip(MavenPublication) { publication -> + pom { + name = "performance-analyzer" + description = "OpenSearch performance-analyzer plugin" + 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/performance-analyzer" + } + } + } + } + } +} + repositories { mavenCentral() mavenLocal() diff --git a/scripts/build.sh b/scripts/build.sh index 7080c537..7f5ae6bd 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -71,3 +71,6 @@ fi mkdir -p $OUTPUT/plugins cp ./build/distributions/*.zip $OUTPUT/plugins +./gradlew publishPluginZipPublicationToZipStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -Dbuild.version_qualifier=$QUALIFIER +mkdir -p $OUTPUT/maven/org/opensearch +cp -r ./build/local-staging-repo/org/opensearch/. $OUTPUT/maven/org/opensearch