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.
If you are looking for a SNAPSHOT version, the Elastic Maven Snapshot repository is available at https://snapshots.elastic.co/maven/.
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>7.3.2</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:7.3.2' }
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 7.0.0-beta1
version which depends on Lucene 8.0.0-snapshot-83f9835
, you must
define the following repository.
For Maven:
<repository> <id>elastic-lucene-snapshots</id> <name>Elastic Lucene Snapshots</name> <url>https://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/83f9835</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> </repository>
For Gradle:
maven { name 'lucene-snapshots' url 'https://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/83f9835' }