diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a8be39b1c..a48ae8b2bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `org.apache.httpcomponents.client5:httpclient5` from 5.2.1 to 5.3 ### Changed -- Restore support for Java 8 ([#767](https://github.com/opensearch-project/opensearch-java/pull/767)) ### Deprecated diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index bdab6cc899..f439c8060e 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -19,7 +19,7 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | Client Version | JDK | |----------------|--------------------| | 1.0.0 | 8 | -| 2.x.0 | 8 / 11 / 17 / 21 | +| 2.x.0 | 11 / 17 / 21 | ## Upgrading diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index a4a67c789b..cdf6a8eef9 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -61,8 +61,8 @@ configurations { } java { - targetCompatibility = JavaVersion.VERSION_1_8 - sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_11 withJavadocJar() withSourcesJar() @@ -146,20 +146,15 @@ val integrationTest = task("integrationTest") { System.getProperty("tests.awsSdk2support.domainRegion", "us-east-1")) } -val opensearchVersion = "2.12.0-SNAPSHOT" - dependencies { + val opensearchVersion = "2.7.0" val jacksonVersion = "2.15.2" val jacksonDatabindVersion = "2.15.2" // Apache 2.0 implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion) testImplementation("org.opensearch.test", "framework", opensearchVersion) - testImplementation("org.hamcrest:hamcrest:2.2") - testImplementation("com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.1") { - exclude(group = "junit") - } // Apache 2.0 // https://search.maven.org/artifact/com.google.code.findbugs/jsr305 @@ -332,38 +327,3 @@ publishing { } } } - -if (JavaVersion.current() >= JavaVersion.VERSION_11) { - val java11: SourceSet = sourceSets.create("java11") { - java { - compileClasspath += sourceSets.main.get().output + sourceSets.test.get().output - runtimeClasspath += sourceSets.main.get().output + sourceSets.test.get().output - srcDir("src/test/java11") - } - } - - configurations[java11.implementationConfigurationName].extendsFrom(configurations.testImplementation.get()) - configurations[java11.runtimeOnlyConfigurationName].extendsFrom(configurations.testRuntimeOnly.get()) - - dependencies { - testImplementation("org.opensearch.test", "framework", opensearchVersion) { - exclude(group = "org.hamcrest") - } - } - - tasks.named("compileJava11Java") { - targetCompatibility = JavaVersion.VERSION_11.toString() - sourceCompatibility = JavaVersion.VERSION_11.toString() - } - - tasks.named("compileTestJava") { - targetCompatibility = JavaVersion.VERSION_11.toString() - sourceCompatibility = JavaVersion.VERSION_11.toString() - } - - tasks.test { - testClassesDirs += java11.output.classesDirs - classpath = sourceSets["java11"].runtimeClasspath - } - -} diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CatIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CatIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java b/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java rename to java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java diff --git a/java-client/src/test/java11/org/opensearch/client/transport/RequestOptionsTest.java b/java-client/src/test/java/org/opensearch/client/transport/RequestOptionsTest.java similarity index 100% rename from java-client/src/test/java11/org/opensearch/client/transport/RequestOptionsTest.java rename to java-client/src/test/java/org/opensearch/client/transport/RequestOptionsTest.java