瀏覽代碼

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
Luca Cavanna 8 年之前
父節點
當前提交
ec66d655b5

+ 3 - 2
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',

+ 1 - 1
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

+ 12 - 1
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}"
 

+ 9 - 0
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}"

+ 10 - 2
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}"

+ 1 - 1
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";
 };

+ 2 - 2
docs/java-rest/high-level/usage.asciidoc

@@ -24,7 +24,7 @@ Add the following to your `pom.xml` file:
 --------------------------------------------------
 <dependency>
     <groupId>org.elasticsearch.client</groupId>
-    <artifactId>rest-high-level</artifactId>
+    <artifactId>elasticsearch-rest-high-level-client</artifactId>
     <version>{version}</version>
 </dependency>
 --------------------------------------------------
@@ -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}'
 }
 --------------------------------------------------
 

+ 2 - 2
docs/java-rest/low-level/sniffer.asciidoc

@@ -26,7 +26,7 @@ Add the following to your `pom.xml` file:
 --------------------------------------------------
 <dependency>
     <groupId>org.elasticsearch.client</groupId>
-    <artifactId>sniffer</artifactId>
+    <artifactId>elasticsearch-rest-client-sniffer</artifactId>
     <version>{version}</version>
 </dependency>
 --------------------------------------------------
@@ -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}'
 }
 --------------------------------------------------
 

+ 2 - 2
docs/java-rest/low-level/usage.asciidoc

@@ -27,7 +27,7 @@ Add the following to your `pom.xml` file:
 --------------------------------------------------
 <dependency>
     <groupId>org.elasticsearch.client</groupId>
-    <artifactId>rest</artifactId>
+    <artifactId>elasticsearch-rest-client</artifactId>
     <version>{version}</version>
 </dependency>
 --------------------------------------------------
@@ -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}'
 }
 --------------------------------------------------
 

+ 1 - 1
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

+ 1 - 1
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}"