Skip to content

Commit f05c27d

Browse files
Updated POM publishing (#903) (#905)
* Updated POM publishing * Added description, licenses and developer information --------- (cherry picked from commit 2af7ee8) Signed-off-by: Owais Kazi <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ac6fd91 commit f05c27d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

build.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,34 @@ allprojects {
9090

9191
group 'org.opensearch.sdk'
9292

93+
allprojects {
94+
// Default to the apache license
95+
project.ext.licenseName = 'The Apache Software License, Version 2.0'
96+
project.ext.licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
97+
publishing {
98+
publications {
99+
// add license information to generated poms
100+
all {
101+
pom {
102+
name = "opensearch-sdk-java"
103+
}
104+
pom.withXml { XmlProvider xml ->
105+
Node node = xml.asNode()
106+
node.appendNode('description', 'OpenSearch Java SDK Client')
107+
108+
Node license = node.appendNode('licenses').appendNode('license')
109+
license.appendNode('name', project.licenseName)
110+
license.appendNode('url', project.licenseUrl)
111+
112+
Node developer = node.appendNode('developers').appendNode('developer')
113+
developer.appendNode('name', 'OpenSearch')
114+
developer.appendNode('url', 'https://github.com/opensearch-project/opensearch-sdk-java')
115+
}
116+
}
117+
}
118+
}
119+
}
120+
93121
publishing {
94122
publications {
95123
mavenJava(MavenPublication) {

0 commit comments

Comments
 (0)