From 7760bed085038445dce2248a48d043507459e617 Mon Sep 17 00:00:00 2001 From: zane-neo Date: Fri, 24 Nov 2023 13:20:25 +0800 Subject: [PATCH 1/2] Add publishing jar Signed-off-by: zane-neo --- ppl/build.gradle | 38 ++++++++++++++++++++++++++++++++++++++ protocol/build.gradle | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/ppl/build.gradle b/ppl/build.gradle index 6d0a67c443..b9d47b592a 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -27,6 +27,7 @@ plugins { id "io.freefair.lombok" id 'jacoco' id 'antlr' + id 'maven-publish' } generateGrammarSource { @@ -97,3 +98,40 @@ jacocoTestCoverageVerification { } } check.dependsOn jacocoTestCoverageVerification + +publishing { + publications { + mavenJava(MavenPublication) { + group = 'opensearch-sql' + artifactId = 'ppl' + from components.java + pom { + name = 'ppl' + description = 'OpenSearch PPL' + groupId = "org.opensearch.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/sql' + } + } + } + } + } + repositories { + maven { + name = "Snapshots" // optional target repository name + url = "https://aws.oss.sonatype.org/content/repositories/snapshots" + credentials { + username "$System.env.SONATYPE_USERNAME" + password "$System.env.SONATYPE_PASSWORD" + } + } + } +} diff --git a/protocol/build.gradle b/protocol/build.gradle index 92a1aa0917..0839b10d04 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -26,6 +26,7 @@ plugins { id 'java' id "io.freefair.lombok" id 'jacoco' + id 'maven-publish' } dependencies { @@ -89,3 +90,40 @@ jacocoTestCoverageVerification { } check.dependsOn jacocoTestCoverageVerification jacocoTestCoverageVerification.dependsOn jacocoTestReport + +publishing { + publications { + mavenJava(MavenPublication) { + group = 'opensearch-sql' + artifactId = 'protocol' + from components.java + pom { + name = 'protocol' + description = 'OpenSearch PPL' + groupId = "org.opensearch.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/sql' + } + } + } + } + } + repositories { + maven { + name = "Snapshots" // optional target repository name + url = "https://aws.oss.sonatype.org/content/repositories/snapshots" + credentials { + username "$System.env.SONATYPE_USERNAME" + password "$System.env.SONATYPE_PASSWORD" + } + } + } +} From 5fd486f1eb2b2200dec3436545cda6690ff1f290 Mon Sep 17 00:00:00 2001 From: zane-neo Date: Fri, 24 Nov 2023 13:59:52 +0800 Subject: [PATCH 2/2] change jar location Signed-off-by: zane-neo --- ppl/build.gradle | 3 +-- protocol/build.gradle | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ppl/build.gradle b/ppl/build.gradle index b9d47b592a..7d1a8e2536 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -102,13 +102,12 @@ check.dependsOn jacocoTestCoverageVerification publishing { publications { mavenJava(MavenPublication) { - group = 'opensearch-sql' artifactId = 'ppl' from components.java pom { name = 'ppl' description = 'OpenSearch PPL' - groupId = "org.opensearch.plugin" + groupId = "opensearch-sql" licenses { license { name = 'The Apache License, Version 2.0' diff --git a/protocol/build.gradle b/protocol/build.gradle index 0839b10d04..56cc1faa29 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -94,13 +94,12 @@ jacocoTestCoverageVerification.dependsOn jacocoTestReport publishing { publications { mavenJava(MavenPublication) { - group = 'opensearch-sql' artifactId = 'protocol' from components.java pom { name = 'protocol' description = 'OpenSearch PPL' - groupId = "org.opensearch.plugin" + groupId = "opensearch-sql" licenses { license { name = 'The Apache License, Version 2.0'