File tree Expand file tree Collapse file tree 7 files changed +11
-49
lines changed
buildSrc/src/main/groovy/org/elasticsearch/gradle
modules/lang-painless/spi Expand file tree Collapse file tree 7 files changed +11
-49
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,16 @@ class BuildPlugin implements Plugin<Project> {
365365
366366 /* *Configuration generation of maven poms. */
367367 static void configurePomGeneration (Project project ) {
368+ // have to defer this until archivesBaseName is set
369+ project. afterEvaluate {
370+ project. pluginManager. withPlugin(' maven-publish' ) {
371+ PublishingExtension publishing = project. extensions. getByType(PublishingExtension )
372+ publishing. publications. withType(MavenPublication ) { MavenPublication publication ->
373+ publication. artifactId = project. convention. getPlugin(BasePluginConvention ). archivesBaseName
374+ }
375+ }
376+ }
377+
368378 project. plugins. withType(MavenPublishPlugin ). whenPluginAdded {
369379 TaskProvider generatePomTask = project. tasks. register(" generatePom" ) { Task task ->
370380 task. dependsOn ' generatePomFileForNebulaPublication'
@@ -375,7 +385,7 @@ class BuildPlugin implements Plugin<Project> {
375385 }
376386
377387 project. tasks. withType(GenerateMavenPom ). configureEach({ GenerateMavenPom pomTask ->
378- pomTask. destination = " ${ project.buildDir} /distributions/${ project.convention.getPlugin(BasePluginConvention).archivesBaseName} -${ project.version} .pom"
388+ pomTask. destination = { " ${ project.buildDir} /distributions/${ project.convention.getPlugin(BasePluginConvention).archivesBaseName} -${ project.version} .pom" }
379389 } as Action<GenerateMavenPom > )
380390
381391 PublishingExtension publishing = project. extensions. getByType(PublishingExtension )
Original file line number Diff line number Diff line change @@ -28,14 +28,6 @@ apply plugin: 'elasticsearch.rest-resources'
2828group = ' org.elasticsearch.client'
2929archivesBaseName = ' elasticsearch-rest-high-level-client'
3030
31- publishing {
32- publications {
33- nebula {
34- artifactId = archivesBaseName
35- }
36- }
37- }
38-
3931restResources {
4032 // we need to copy the yaml spec so we can check naming (see RestHighlevelClientTests#testApiNamingConventions)
4133 restApi {
Original file line number Diff line number Diff line change @@ -28,14 +28,6 @@ sourceCompatibility = JavaVersion.VERSION_1_8
2828group = ' org.elasticsearch.client'
2929archivesBaseName = ' elasticsearch-rest-client'
3030
31- publishing {
32- publications {
33- nebula {
34- artifactId = archivesBaseName
35- }
36- }
37- }
38-
3931dependencies {
4032 compile " org.apache.httpcomponents:httpclient:${ versions.httpclient} "
4133 compile " org.apache.httpcomponents:httpcore:${ versions.httpcore} "
Original file line number Diff line number Diff line change @@ -26,14 +26,6 @@ sourceCompatibility = JavaVersion.VERSION_1_8
2626group = ' org.elasticsearch.client'
2727archivesBaseName = ' elasticsearch-rest-client-sniffer'
2828
29- publishing {
30- publications {
31- nebula {
32- artifactId = archivesBaseName
33- }
34- }
35- }
36-
3729dependencies {
3830 compile project(" :client:rest" )
3931 compile " org.apache.httpcomponents:httpclient:${ versions.httpclient} "
Original file line number Diff line number Diff line change @@ -64,14 +64,6 @@ if (!isEclipse) {
6464 }
6565}
6666
67- publishing {
68- publications {
69- nebula {
70- artifactId = archivesBaseName
71- }
72- }
73- }
74-
7567dependencies {
7668 // This dependency is used only by :libs:core for null-checking interop with other tools
7769 compileOnly " com.google.code.findbugs:jsr305:3.0.2"
Original file line number Diff line number Diff line change @@ -24,14 +24,6 @@ apply plugin: 'nebula.maven-scm'
2424group = ' org.elasticsearch.plugin'
2525archivesBaseName = ' elasticsearch-scripting-painless-spi'
2626
27- publishing {
28- publications {
29- nebula {
30- artifactId = archivesBaseName
31- }
32- }
33- }
34-
3527dependencies {
3628 compile project(" :server" )
3729}
Original file line number Diff line number Diff line change @@ -31,11 +31,3 @@ testingConventions {
3131 }
3232 }
3333}
34-
35- publishing {
36- publications {
37- nebula(MavenPublication ) {
38- artifactId = archivesBaseName
39- }
40- }
41- }
You can’t perform that action at this time.
0 commit comments