diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f324d9d..c1805022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on ho ### Infrastructure ### Documentation ### Maintenance +* Persist necessary license and developer information in maven pom ([#732](https://github.com/opensearch-project/geospatial/pull/732)) ### Refactoring ## [Unreleased 2.x](https://github.com/opensearch-project/geospatial/compare/2.19...2.x) diff --git a/build.gradle b/build.gradle index 2d204d4b..44f06c73 100644 --- a/build.gradle +++ b/build.gradle @@ -116,7 +116,6 @@ test { include '**/*Tests.class' systemProperty 'tests.security.manager', 'false' } - publishing { repositories { maven { @@ -138,24 +137,31 @@ publishing { name = pluginName description = pluginDescription 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/geospatial" - } - } + } + } + all { + pom { + name = pluginName + description = pluginDescription + } + pom.withXml { XmlProvider xml -> + Node node = xml.asNode() + node.appendNode('inceptionYear', '2021') + + Node license = node.appendNode('licenses').appendNode('license') + license.appendNode('name', "The Apache License, Version 2.0") + license.appendNode('url', "http://www.apache.org/licenses/LICENSE-2.0.txt") + + Node developer = node.appendNode('developers').appendNode('developer') + developer.appendNode('name', 'OpenSearch') + developer.appendNode('url', 'https://github.com/opensearch-project/geospatial') } } } } + configurations { zipArchive } diff --git a/client/build.gradle b/client/build.gradle index 5f682086..2fe330bd 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -70,22 +70,22 @@ publishing { } } publications { - pluginZip(MavenPublication) { publication -> + all { pom { name = "opensearch-geospatial-client" description = 'OpenSearch Geospatial client' - 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/geospatial" - } - } + } + pom.withXml { XmlProvider xml -> + Node node = xml.asNode() + node.appendNode('inceptionYear', '2021') + + Node license = node.appendNode('licenses').appendNode('license') + license.appendNode('name', "The Apache License, Version 2.0") + license.appendNode('url', "http://www.apache.org/licenses/LICENSE-2.0.txt") + + Node developer = node.appendNode('developers').appendNode('developer') + developer.appendNode('name', 'OpenSearch') + developer.appendNode('url', 'https://github.com/opensearch-project/geospatial') } } }