File tree 7 files changed +11
-49
lines changed
buildSrc/src/main/groovy/org/elasticsearch/gradle
modules/lang-painless/spi
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> {
365
365
366
366
/* *Configuration generation of maven poms. */
367
367
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
+
368
378
project. plugins. withType(MavenPublishPlugin ). whenPluginAdded {
369
379
TaskProvider generatePomTask = project. tasks. register(" generatePom" ) { Task task ->
370
380
task. dependsOn ' generatePomFileForNebulaPublication'
@@ -375,7 +385,7 @@ class BuildPlugin implements Plugin<Project> {
375
385
}
376
386
377
387
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" }
379
389
} as Action<GenerateMavenPom > )
380
390
381
391
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'
28
28
group = ' org.elasticsearch.client'
29
29
archivesBaseName = ' elasticsearch-rest-high-level-client'
30
30
31
- publishing {
32
- publications {
33
- nebula {
34
- artifactId = archivesBaseName
35
- }
36
- }
37
- }
38
-
39
31
restResources {
40
32
// we need to copy the yaml spec so we can check naming (see RestHighlevelClientTests#testApiNamingConventions)
41
33
restApi {
Original file line number Diff line number Diff line change @@ -28,14 +28,6 @@ sourceCompatibility = JavaVersion.VERSION_1_8
28
28
group = ' org.elasticsearch.client'
29
29
archivesBaseName = ' elasticsearch-rest-client'
30
30
31
- publishing {
32
- publications {
33
- nebula {
34
- artifactId = archivesBaseName
35
- }
36
- }
37
- }
38
-
39
31
dependencies {
40
32
compile " org.apache.httpcomponents:httpclient:${ versions.httpclient} "
41
33
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
26
26
group = ' org.elasticsearch.client'
27
27
archivesBaseName = ' elasticsearch-rest-client-sniffer'
28
28
29
- publishing {
30
- publications {
31
- nebula {
32
- artifactId = archivesBaseName
33
- }
34
- }
35
- }
36
-
37
29
dependencies {
38
30
compile project(" :client:rest" )
39
31
compile " org.apache.httpcomponents:httpclient:${ versions.httpclient} "
Original file line number Diff line number Diff line change @@ -64,14 +64,6 @@ if (!isEclipse) {
64
64
}
65
65
}
66
66
67
- publishing {
68
- publications {
69
- nebula {
70
- artifactId = archivesBaseName
71
- }
72
- }
73
- }
74
-
75
67
dependencies {
76
68
// This dependency is used only by :libs:core for null-checking interop with other tools
77
69
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'
24
24
group = ' org.elasticsearch.plugin'
25
25
archivesBaseName = ' elasticsearch-scripting-painless-spi'
26
26
27
- publishing {
28
- publications {
29
- nebula {
30
- artifactId = archivesBaseName
31
- }
32
- }
33
- }
34
-
35
27
dependencies {
36
28
compile project(" :server" )
37
29
}
Original file line number Diff line number Diff line change @@ -31,11 +31,3 @@ testingConventions {
31
31
}
32
32
}
33
33
}
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