Maven Repository
editMaven Repository
editThe high-level Java REST client is hosted on
Maven
Central. The minimum Java version required is 1.8
.
The High Level REST Client is subject to the same release cycle as Elasticsearch. Replace the version with the desired client version.
Maven configuration
editHere is how you can configure the dependency using maven as a dependency manager.
Add the following to your pom.xml
file:
<dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>6.0.1</version> </dependency>
Gradle configuration
editHere is how you can configure the dependency using gradle as a dependency manager.
Add the following to your build.gradle
file:
dependencies { compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.0.1' }
Lucene Snapshot repository
editThe very first releases of any major version (like a beta), might have been built on top of a Lucene Snapshot version. In such a case you will be unable to resolve the Lucene dependencies of the client.
For example, if you want to use the 6.0.0-beta1
version which depends on Lucene 7.0.0-snapshot-00142c9
, you must
define the following repository.
For Maven:
<repository> <id>elastic-lucene-snapshots</id> <name>Elastic Lucene Snapshots</name> <url>http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/00142c9</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> </repository>
For Gradle:
maven { url 'http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/00142c9' }