Skip to content

Commit a39f051

Browse files
authored
persist licenses and developers info in pom files (#732)
Signed-off-by: will-hwang <[email protected]>
1 parent 2edfedf commit a39f051

File tree

3 files changed

+33
-26
lines changed

3 files changed

+33
-26
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on ho
1111
### Infrastructure
1212
### Documentation
1313
### Maintenance
14+
* Persist necessary license and developer information in maven pom ([#732](https://github.com/opensearch-project/geospatial/pull/732))
1415
### Refactoring
1516

1617
## [Unreleased 2.x](https://github.com/opensearch-project/geospatial/compare/2.19...2.x)

build.gradle

+19-13
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ test {
116116
include '**/*Tests.class'
117117
systemProperty 'tests.security.manager', 'false'
118118
}
119-
120119
publishing {
121120
repositories {
122121
maven {
@@ -138,24 +137,31 @@ publishing {
138137
name = pluginName
139138
description = pluginDescription
140139
groupId = "org.opensearch.plugin"
141-
licenses {
142-
license {
143-
name = "The Apache License, Version 2.0"
144-
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
145-
}
146-
}
147-
developers {
148-
developer {
149-
name = "OpenSearch"
150-
url = "https://github.com/opensearch-project/geospatial"
151-
}
152-
}
140+
}
141+
}
142+
all {
143+
pom {
144+
name = pluginName
145+
description = pluginDescription
146+
}
147+
pom.withXml { XmlProvider xml ->
148+
Node node = xml.asNode()
149+
node.appendNode('inceptionYear', '2021')
150+
151+
Node license = node.appendNode('licenses').appendNode('license')
152+
license.appendNode('name', "The Apache License, Version 2.0")
153+
license.appendNode('url', "http://www.apache.org/licenses/LICENSE-2.0.txt")
154+
155+
Node developer = node.appendNode('developers').appendNode('developer')
156+
developer.appendNode('name', 'OpenSearch')
157+
developer.appendNode('url', 'https://github.com/opensearch-project/geospatial')
153158
}
154159
}
155160
}
156161
}
157162

158163

164+
159165
configurations {
160166
zipArchive
161167
}

client/build.gradle

+13-13
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@ publishing {
7070
}
7171
}
7272
publications {
73-
pluginZip(MavenPublication) { publication ->
73+
all {
7474
pom {
7575
name = "opensearch-geospatial-client"
7676
description = 'OpenSearch Geospatial client'
77-
licenses {
78-
license {
79-
name = "The Apache License, Version 2.0"
80-
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
81-
}
82-
}
83-
developers {
84-
developer {
85-
name = "OpenSearch"
86-
url = "https://github.com/opensearch-project/geospatial"
87-
}
88-
}
77+
}
78+
pom.withXml { XmlProvider xml ->
79+
Node node = xml.asNode()
80+
node.appendNode('inceptionYear', '2021')
81+
82+
Node license = node.appendNode('licenses').appendNode('license')
83+
license.appendNode('name', "The Apache License, Version 2.0")
84+
license.appendNode('url', "http://www.apache.org/licenses/LICENSE-2.0.txt")
85+
86+
Node developer = node.appendNode('developers').appendNode('developer')
87+
developer.appendNode('name', 'OpenSearch')
88+
developer.appendNode('url', 'https://github.com/opensearch-project/geospatial')
8989
}
9090
}
9191
}

0 commit comments

Comments
 (0)