Skip to content

Commit e917390

Browse files
authored
Remove client jar support from build (#42640)
The client jars were a way for modules and plugins to produce an additional jar that contained classes for use by the transport client. This commit removes that configuration as the transport client is being removed. relates #42638
1 parent c9fb1ee commit e917390

File tree

11 files changed

+3
-36
lines changed

11 files changed

+3
-36
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package org.elasticsearch.gradle.plugin
2020

2121
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
22-
import nebula.plugin.publishing.maven.MavenScmPlugin
2322
import org.elasticsearch.gradle.BuildPlugin
2423
import org.elasticsearch.gradle.NoticeTask
2524
import org.elasticsearch.gradle.Version
@@ -33,11 +32,9 @@ import org.gradle.api.Project
3332
import org.gradle.api.Task
3433
import org.gradle.api.publish.maven.MavenPublication
3534
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
36-
import org.gradle.api.publish.maven.tasks.GenerateMavenPom
3735
import org.gradle.api.tasks.Copy
3836
import org.gradle.api.tasks.SourceSet
3937
import org.gradle.api.tasks.bundling.Zip
40-
import org.gradle.jvm.tasks.Jar
4138

4239
import java.util.regex.Matcher
4340
import java.util.regex.Pattern
@@ -131,25 +128,10 @@ class PluginBuildPlugin implements Plugin<Project> {
131128
}
132129

133130
private void configurePublishing(Project project, PluginPropertiesExtension extension) {
134-
// Only configure publishing if applied externally
135-
if (extension.hasClientJar) {
136-
project.plugins.apply(MavenScmPlugin.class)
137-
// Only change Jar tasks, we don't want a -client zip so we can't change archivesBaseName
138-
project.tasks.withType(Jar) {
139-
baseName = baseName + "-client"
140-
}
141-
// always configure publishing for client jars
142-
project.plugins.apply(MavenScmPlugin.class)
143-
project.publishing.publications.nebula(MavenPublication).artifactId(extension.name + "-client")
144-
project.tasks.withType(GenerateMavenPom.class) { GenerateMavenPom generatePOMTask ->
145-
generatePOMTask.ext.pomFileName = "${project.archivesBaseName}-client-${project.versions.elasticsearch}.pom"
146-
}
147-
} else {
148-
if (project.plugins.hasPlugin(MavenPublishPlugin)) {
149-
project.publishing.publications.nebula(MavenPublication).artifactId(extension.name)
150-
}
151-
131+
if (project.plugins.hasPlugin(MavenPublishPlugin)) {
132+
project.publishing.publications.nebula(MavenPublication).artifactId(extension.name)
152133
}
134+
153135
}
154136

155137
private static void configureDependencies(Project project) {
@@ -260,8 +242,6 @@ class PluginBuildPlugin implements Plugin<Project> {
260242
project.artifacts.add('zip', bundle)
261243
}
262244

263-
/** Adds a task to move jar and associated files to a "-client" name. */
264-
265245
static final Pattern GIT_PATTERN = Pattern.compile(/git@([^:]+):([^\.]+)\.git/)
266246

267247
/** Find the reponame. */

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginPropertiesExtension.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ class PluginPropertiesExtension {
4747
@Input
4848
boolean hasNativeController = false
4949

50-
/** Indicates whether the plugin jar should be made available for the transport client. */
51-
@Input
52-
boolean hasClientJar = false
53-
5450
/** True if the plugin requires the elasticsearch keystore to exist, false otherwise. */
5551
@Input
5652
boolean requiresKeystore = false

modules/aggs-matrix-stats/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@
2020
esplugin {
2121
description 'Adds aggregations whose input are a list of numeric fields and output includes a matrix.'
2222
classname 'org.elasticsearch.search.aggregations.matrix.MatrixAggregationPlugin'
23-
hasClientJar = true
2423
}

modules/lang-mustache/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
esplugin {
2121
description 'Mustache scripting integration for Elasticsearch'
2222
classname 'org.elasticsearch.script.mustache.MustachePlugin'
23-
hasClientJar = true // For the template apis and query
2423
}
2524

2625
dependencies {

modules/parent-join/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@
2020
esplugin {
2121
description 'This module adds the support parent-child queries and aggregations'
2222
classname 'org.elasticsearch.join.ParentJoinPlugin'
23-
hasClientJar = true
2423
}

modules/percolator/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
esplugin {
2121
description 'Percolator module adds capability to index queries and query these queries by specifying documents'
2222
classname 'org.elasticsearch.percolator.PercolatorPlugin'
23-
hasClientJar = true
2423
}
2524

2625
dependencies {

modules/rank-eval/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
esplugin {
2121
description 'The Rank Eval module adds APIs to evaluate ranking quality.'
2222
classname 'org.elasticsearch.index.rankeval.RankEvalPlugin'
23-
hasClientJar = true
2423
}
2524

2625
testClusters.integTest {

modules/reindex/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ apply plugin: 'elasticsearch.test-with-dependencies'
2626
esplugin {
2727
description 'The Reindex module adds APIs to reindex from one index to another or update documents in place.'
2828
classname 'org.elasticsearch.index.reindex.ReindexPlugin'
29-
hasClientJar = true
3029
}
3130

3231
testClusters.integTest {

modules/transport-netty4/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
esplugin {
2727
description 'Netty 4 based transport implementation'
2828
classname 'org.elasticsearch.transport.Netty4Plugin'
29-
hasClientJar = true
3029
}
3130

3231
compileTestJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked"

plugins/analysis-icu/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
2222
esplugin {
2323
description 'The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.'
2424
classname 'org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin'
25-
hasClientJar = true
2625
}
2726

2827
tasks.withType(CheckForbiddenApis) {

plugins/transport-nio/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ apply plugin: "nebula.maven-scm"
2121
esplugin {
2222
description 'The nio transport.'
2323
classname 'org.elasticsearch.transport.nio.NioTransportPlugin'
24-
hasClientJar = true
2524
}
2625

2726
dependencies {

0 commit comments

Comments
 (0)