diff --git a/.ci/Dockerfile b/.ci/Dockerfile
index 9ec81b90b..1fcb0eeff 100644
--- a/.ci/Dockerfile
+++ b/.ci/Dockerfile
@@ -34,6 +34,7 @@ COPY LICENSE.txt NOTICE.txt ./
# Prefetch dependencies
COPY build.gradle.kts settings.gradle.kts ./
COPY buildSrc ./buildSrc/
+COPY config ./config/
COPY java-client/build.gradle.kts ./java-client/
RUN ./gradlew resolveDependencies
diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml
index 9af5602ef..89c3972f4 100644
--- a/.github/workflows/checkstyle.yml
+++ b/.github/workflows/checkstyle.yml
@@ -4,14 +4,17 @@ on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java-version: [ 11 ]
steps:
- uses: actions/checkout@v2
- - name: Set up JDK 11
+ - name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v2
with:
- java-version: '11'
- distribution: 'adopt'
+ java-version: ${{ matrix.java-version }}
+ distribution: 'temurin'
- name: Check style and license headers
run: |
diff --git a/README.md b/README.md
index 898f42831..bcfd92bbc 100644
--- a/README.md
+++ b/README.md
@@ -22,16 +22,11 @@ The `docs/design` folder contains records of the major decisions in the design o
### Installing the library
-While it's a work in progress, snapshots of this library are published to a Maven repository hosted on [GitHub Packages](https://github.com/elastic/elasticsearch-java/packages/). To access it [you need a personal access token](https://github.com/settings/tokens) on your GitHub account that has the `read:packages` permission. This token should then be added to `~/.gradle/gradle.properties`:
-
-```properties
-ESJavaGithubPackagesUsername=YOUR_GITHUB_USERNAME
-ESJavaGithubPackagesPassword=YOUR_GITHUB_TOKEN
-```
+This library requires at least Java 8.
Along with this library, you also need a JSON/object mapping library. `elasticsearch-java` has built-in support for [Jackson](https://github.com/FasterXML/jackson) and [JSON-B](http://json-b.net/) implementations such as [Eclipse Yasson](https://github.com/eclipse-ee4j/yasson).
-This library requires at least Java 8.
+While it's a work in progress, snapshots of this library are published to Elastic's snapshot repository. Snapshots are currently available for the upcoming version 7.15.0, built from the `7.x` branch.
Gradle project (Groovy flavor) setup using Jackson:
@@ -39,52 +34,37 @@ Gradle project (Groovy flavor) setup using Jackson:
repositories {
mavenCentral()
maven {
- name = "ESJavaGithubPackages"
- url = uri("https://maven.pkg.github.com/elastic/elasticsearch-java")
- credentials(PasswordCredentials)
+ name = "Elastic-Snapshots"
+ url = uri("https://snapshots.elastic.co/maven")
}
}
dependencies {
- implementation 'co.elastic.clients:elasticsearch-java:8.0.0-SNAPSHOT'
+ implementation 'co.elastic.clients:elasticsearch-java:7.15.0-SNAPSHOT'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
}
```
-If you are using Maven, you need to add the credentials in your `~/.m2/settings.xml`:
-
-```xml
-
-
-
- ESJavaGithubPackages
- YOUR_GITHUB_USERNAME
- YOUR_GITHUB_TOKEN
-
-
-
-```
-
In the `pom.xml` for your project add the following repository definition and dependencies:
```xml
-
+
- ESJavaGithubPackages
- https://maven.pkg.github.com/elastic/elasticsearch-java
+ Elastic-Snapshots
+ https://snapshots.elastic.co/maven
true
-
+
co.elastic.clients
elasticsearch-java
- 8.0.0-SNAPSHOT
+ 7.15.0-SNAPSHOT
com.fasterxml.jackson.core
@@ -92,7 +72,7 @@ In the `pom.xml` for your project add the following repository definition and de
2.12.3
-
+
```
@@ -125,14 +105,14 @@ if (search.hits().hits().isEmpty()) {
## Compatibility
-The `main` branch targets the upcoming Elasticsearch 8.0. Support is still incomplete as the API code is generated from the [Elasticsearch Specification](https://github.com/elastic/elasticsearch-specification) that is also still a work in progress.
+The `main` branch targets the next major release (8.0) and the `7.x` branch targets the next minor release. Support is still incomplete as the API code is generated from the [Elasticsearch Specification](https://github.com/elastic/elasticsearch-specification) that is also still a work in progress.
-As the work on the specification comes to completion, an additional `7.x` branch will provide support for the corresponding versions of Elasticsearch.
+The Elasticsearch Java client is forward compatible; meaning that the client supports communicating with greater minor versions of Elasticsearch. Elastic language clients are also backwards compatible with lesser supported minor Elasticsearch versions.
## Current status
While not complete, this library is already fairly usable. What's missing falls in two main categories, related to the [Elasticsearch specification](https://github.com/elastic/elasticsearch-specification):
-* incomplete support for some data types used in specification (e.g. unions). Until they have been implemented in the code generator, they are represented as raw `JsonValue` objects.
+* incomplete support for some data types used in specification (e.g. unions). Until they have been implemented in the code generator, they are represented as raw `JsonValue` objects.
* incomplete APIs: as the API specification is still incomplete, so are their implementations in this library since their code is entirely generated from the spec.
## Contributing
diff --git a/build.gradle.kts b/build.gradle.kts
index 6855300ee..d4d8903b9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -19,7 +19,9 @@
allprojects {
group = "co.elastic.clients"
- version = System.getenv("VERSION") ?: "8.0.0-SNAPSHOT"
+ // Release manager provides a $VERSION. If not present, it's a local or CI snapshot build.
+ version = System.getenv("VERSION") ?:
+ (File(project.rootDir, "config/version.txt").readText().trim() + "-SNAPSHOT")
repositories {
mavenCentral()
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index 9b768e9ac..96ccb95f8 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -39,12 +39,14 @@
+