mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Add pom info to all xplugins generated poms (elastic/elasticsearch#4167)
* Add pom info to all xplugins generated poms This change is the xplugins side of elastic/elasticsearchelastic/elasticsearch#21757. We were previously adding the apache license info to the xplugins poms (but the zips still contained our commercial EULA). There is also a placeholder here to add license info back into xpack artifact poms. I also created a follow up issue to do better validation of these poms in the future (with this change, without the corresponding change in ES, a broken pom would be generated with two `developers` sections): elastic/elasticsearchelastic/elasticsearch#21758. * Add commercial license info to pom Original commit: elastic/x-pack-elasticsearch@8f6941f82b
This commit is contained in:
parent
c4e890cba0
commit
354cfcbb72
24
build.gradle
24
build.gradle
@ -6,14 +6,30 @@ if (project.projectDir.name != 'x-plugins') {
|
||||
}
|
||||
|
||||
subprojects {
|
||||
// we must not publish to sonatype until we have set up x-plugins to only publish the parts we want to publish!
|
||||
project.afterEvaluate {
|
||||
if (project.plugins.hasPlugin('com.bmuschko.nexus') && project.nexus.repositoryUrl.startsWith('file://') == false) {
|
||||
uploadArchives.enabled = false
|
||||
plugins.withType(MavenPublishPlugin).whenPluginAdded {
|
||||
publishing {
|
||||
publications {
|
||||
// add license information to generated poms
|
||||
all {
|
||||
pom.withXml { XmlProvider xml ->
|
||||
Node node = xml.asNode()
|
||||
|
||||
Node license = node.appendNode('licenses').appendNode('license')
|
||||
license.appendNode('name', 'Elastic Commercial Software End User License Agreement')
|
||||
license.appendNode('url', 'https://www.elastic.co/eula/')
|
||||
license.appendNode('distribution', 'repo')
|
||||
|
||||
Node developer = node.appendNode('developers').appendNode('developer')
|
||||
developer.appendNode('name', 'Elastic')
|
||||
developer.appendNode('url', 'http://www.elastic.co')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task bundlePack(type: Zip) {
|
||||
onlyIf { project('kibana').bundlePlugin.enabled }
|
||||
dependsOn 'elasticsearch:bundlePlugin'
|
||||
|
Loading…
x
Reference in New Issue
Block a user