Build: Remove x-pack-api jar (elastic/x-pack-elasticsearch#3864)

The api jar was added for xpack extensions. However, extensions have
been removed in favor of using SPI, and the individual xpack jars like
core and security are published to enable this. This commit removes the
api jar, and switches the transport client to use the core jar (which
the api jar was just a rename of).

Original commit: elastic/x-pack-elasticsearch@58e069e66c
This commit is contained in:
Ryan Ernst 2018-02-07 19:21:43 -08:00 committed by GitHub
parent 736cc05d72
commit 8ee3de122b
4 changed files with 2 additions and 35 deletions

View File

@ -65,7 +65,6 @@ subprojects {
approvedLicenses = ['Elasticsearch Confidential', 'Generated']
additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL'
}
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": xpackModule('core')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-core:${version}": xpackModule('core')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-deprecation:${version}": xpackModule('deprecation')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-graph:${version}": xpackModule('graph')]

View File

@ -10,7 +10,7 @@ import org.elasticsearch.gradle.test.RunTask;
apply plugin: 'elasticsearch.es-meta-plugin'
archivesBaseName = 'x-pack' // for api jar
archivesBaseName = 'x-pack'
es_meta_plugin {
name = 'x-pack'

View File

@ -85,38 +85,6 @@ sourceSets.test.java {
srcDir '../../license-tools/src/main/java'
}
// TODO: remove this jar once xpack extensions have been removed
// assemble the API JAR for the transport-client and extension authors; this JAR is the core JAR by another name
project.afterEvaluate {
task apiJar {
dependsOn('generatePomFileForApijarPublication', project.jar)
doFirst {
Path jarFile = project.jar.outputs.files.singleFile.toPath()
String apiFileName = jarFile.fileName.toString().replace("core-${project.version}", "api-${project.version}")
Files.copy(jarFile, jarFile.resolveSibling(apiFileName), StandardCopyOption.REPLACE_EXISTING)
String pomFileName = jarFile.fileName.toString().replace('.jar', '.pom')
String apiPomFileName = apiFileName.replace('.jar', '.pom')
Files.copy(jarFile.resolveSibling(pomFileName), jarFile.resolveSibling(apiPomFileName),
StandardCopyOption.REPLACE_EXISTING)
}
}
assemble.dependsOn(apiJar)
project.publishing {
publications {
apijar(MavenPublication) {
from project.components.java
artifactId = 'x-pack-api'
pom.withXml { XmlProvider xml ->
Node root = xml.asNode()
root.appendNode('name', project.pluginProperties.extension.name)
root.appendNode('description', project.pluginProperties.extension.description)
}
}
}
}
}
test {
/*
* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each

View File

@ -10,7 +10,7 @@ archivesBaseName = 'x-pack-transport'
dependencies {
// this "api" dependency looks weird, but it is correct, as it contains
// all of x-pack for now, and transport client will be going away in the future.
compile "org.elasticsearch.plugin:x-pack-api:${version}"
compile "org.elasticsearch.plugin:x-pack-core:${version}"
compile "org.elasticsearch.client:transport:${version}"
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"