From ec66d655b5c3745bfaa5713225ed26d4c9fc5056 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 13 Jul 2017 09:44:25 +0200 Subject: [PATCH] Rename client artifacts (#25693) It was brought up that our current client artifacts have generic names like 'rest' that may cause conflicts with other artifacts. This commit renames: - rest -> elasticsearch-rest-client - sniffer -> elasticsearch-rest-client-sniffer - rest-high-level -> elasticsearch-rest-high-level-client A couple of small changes are also preparing the high level client for its first release. Closes #20248 --- build.gradle | 5 +++-- client/benchmark/build.gradle | 2 +- client/rest-high-level/build.gradle | 13 ++++++++++++- client/rest/build.gradle | 9 +++++++++ client/sniffer/build.gradle | 12 ++++++++++-- .../elasticsearch/bootstrap/test-framework.policy | 2 +- docs/java-rest/high-level/usage.asciidoc | 4 ++-- docs/java-rest/low-level/sniffer.asciidoc | 4 ++-- docs/java-rest/low-level/usage.asciidoc | 4 ++-- modules/reindex/build.gradle | 2 +- test/framework/build.gradle | 2 +- 11 files changed, 44 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 05baaebb276..00d1a54b266 100644 --- a/build.gradle +++ b/build.gradle @@ -214,8 +214,9 @@ subprojects { "org.elasticsearch.gradle:build-tools:${version}": ':build-tools', "org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec', "org.elasticsearch:elasticsearch:${version}": ':core', - "org.elasticsearch.client:rest:${version}": ':client:rest', - "org.elasticsearch.client:sniffer:${version}": ':client:sniffer', + "org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest', + "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer', + "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level', "org.elasticsearch.client:test:${version}": ':client:test', "org.elasticsearch.client:transport:${version}": ':client:transport', "org.elasticsearch.test:framework:${version}": ':test:framework', diff --git a/client/benchmark/build.gradle b/client/benchmark/build.gradle index 07186c80270..f488c75b1df 100644 --- a/client/benchmark/build.gradle +++ b/client/benchmark/build.gradle @@ -53,7 +53,7 @@ task test(type: Test, overwrite: true) dependencies { compile 'org.apache.commons:commons-math3:3.2' - compile("org.elasticsearch.client:rest:${version}") + compile("org.elasticsearch.client:elasticsearch-rest-client:${version}") // bottleneck should be the client, not Elasticsearch compile project(path: ':client:client-benchmark-noop-api-plugin') // for transport client diff --git a/client/rest-high-level/build.gradle b/client/rest-high-level/build.gradle index 9203b8978fd..600bf602080 100644 --- a/client/rest-high-level/build.gradle +++ b/client/rest-high-level/build.gradle @@ -20,12 +20,23 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks */ apply plugin: 'elasticsearch.build' apply plugin: 'elasticsearch.rest-test' +apply plugin: 'nebula.maven-base-publish' +apply plugin: 'nebula.maven-scm' group = 'org.elasticsearch.client' +archivesBaseName = 'elasticsearch-rest-high-level-client' + +publishing { + publications { + nebula { + artifactId = archivesBaseName + } + } +} dependencies { compile "org.elasticsearch:elasticsearch:${version}" - compile "org.elasticsearch.client:rest:${version}" + compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile "org.elasticsearch.plugin:parent-join-client:${version}" compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}" diff --git a/client/rest/build.gradle b/client/rest/build.gradle index 20e1fb8b577..ac489f58711 100644 --- a/client/rest/build.gradle +++ b/client/rest/build.gradle @@ -28,6 +28,15 @@ targetCompatibility = JavaVersion.VERSION_1_7 sourceCompatibility = JavaVersion.VERSION_1_7 group = 'org.elasticsearch.client' +archivesBaseName = 'elasticsearch-rest-client' + +publishing { + publications { + nebula { + artifactId = archivesBaseName + } + } +} dependencies { compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" diff --git a/client/sniffer/build.gradle b/client/sniffer/build.gradle index 5542792835b..f9a01903a31 100644 --- a/client/sniffer/build.gradle +++ b/client/sniffer/build.gradle @@ -18,7 +18,6 @@ */ import org.elasticsearch.gradle.precommit.PrecommitTasks -import org.gradle.api.JavaVersion apply plugin: 'elasticsearch.build' apply plugin: 'ru.vyarus.animalsniffer' @@ -29,9 +28,18 @@ targetCompatibility = JavaVersion.VERSION_1_7 sourceCompatibility = JavaVersion.VERSION_1_7 group = 'org.elasticsearch.client' +archivesBaseName = 'elasticsearch-rest-client-sniffer' + +publishing { + publications { + nebula { + artifactId = archivesBaseName + } + } +} dependencies { - compile "org.elasticsearch.client:rest:${version}" + compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" compile "commons-codec:commons-codec:${versions.commonscodec}" diff --git a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy index b9917e18d89..e73c5c25723 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy @@ -64,7 +64,7 @@ grant codeBase "${codebase.mocksocket-1.2.jar}" { }; -grant codeBase "${codebase.rest-6.0.0-beta1-SNAPSHOT.jar}" { +grant codeBase "${codebase.elasticsearch-rest-client-6.0.0-beta1-SNAPSHOT.jar}" { // rest makes socket connections for rest tests permission java.net.SocketPermission "*", "connect"; }; diff --git a/docs/java-rest/high-level/usage.asciidoc b/docs/java-rest/high-level/usage.asciidoc index 3dcba240ec4..b6ccaed6e9e 100644 --- a/docs/java-rest/high-level/usage.asciidoc +++ b/docs/java-rest/high-level/usage.asciidoc @@ -24,7 +24,7 @@ Add the following to your `pom.xml` file: -------------------------------------------------- org.elasticsearch.client - rest-high-level + elasticsearch-rest-high-level-client {version} -------------------------------------------------- @@ -38,7 +38,7 @@ Add the following to your `build.gradle` file: ["source","groovy",subs="attributes"] -------------------------------------------------- dependencies { - compile 'org.elasticsearch.client:rest-high-level:{version}' + compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:{version}' } -------------------------------------------------- diff --git a/docs/java-rest/low-level/sniffer.asciidoc b/docs/java-rest/low-level/sniffer.asciidoc index e0bee7456e7..ef0cd538f30 100644 --- a/docs/java-rest/low-level/sniffer.asciidoc +++ b/docs/java-rest/low-level/sniffer.asciidoc @@ -26,7 +26,7 @@ Add the following to your `pom.xml` file: -------------------------------------------------- org.elasticsearch.client - sniffer + elasticsearch-rest-client-sniffer {version} -------------------------------------------------- @@ -39,7 +39,7 @@ Add the following to your `build.gradle` file: ["source","groovy",subs="attributes"] -------------------------------------------------- dependencies { - compile 'org.elasticsearch.client:sniffer:{version}' + compile 'org.elasticsearch.client:elasticsearch-rest-client-sniffer:{version}' } -------------------------------------------------- diff --git a/docs/java-rest/low-level/usage.asciidoc b/docs/java-rest/low-level/usage.asciidoc index 4ac2454f05b..78c153adff0 100644 --- a/docs/java-rest/low-level/usage.asciidoc +++ b/docs/java-rest/low-level/usage.asciidoc @@ -27,7 +27,7 @@ Add the following to your `pom.xml` file: -------------------------------------------------- org.elasticsearch.client - rest + elasticsearch-rest-client {version} -------------------------------------------------- @@ -41,7 +41,7 @@ Add the following to your `build.gradle` file: ["source","groovy",subs="attributes"] -------------------------------------------------- dependencies { - compile 'org.elasticsearch.client:rest:{version}' + compile 'org.elasticsearch.client:elasticsearch-rest-client:{version}' } -------------------------------------------------- diff --git a/modules/reindex/build.gradle b/modules/reindex/build.gradle index b636c46d3af..7ca5289e55b 100644 --- a/modules/reindex/build.gradle +++ b/modules/reindex/build.gradle @@ -36,7 +36,7 @@ run { } dependencies { - compile "org.elasticsearch.client:rest:${version}" + compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" // for http - testing reindex from remote testCompile project(path: ':modules:transport-netty4', configuration: 'runtime') // for parent/child testing diff --git a/test/framework/build.gradle b/test/framework/build.gradle index 6bc19da2dcf..b651fc2225c 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -26,7 +26,7 @@ dependencies { compile "org.hamcrest:hamcrest-all:${versions.hamcrest}" compile "org.apache.lucene:lucene-test-framework:${versions.lucene}" compile "org.apache.lucene:lucene-codecs:${versions.lucene}" - compile "org.elasticsearch.client:rest:${version}" + compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" compile "commons-logging:commons-logging:${versions.commonslogging}"