From da68edc7370123c9b9394d42f9d82aa4e8f9e2cc Mon Sep 17 00:00:00 2001 From: Mariusz Jozala Date: Fri, 25 Apr 2025 14:49:49 +0200 Subject: [PATCH 1/2] [Test] Use version range for elasticsearch-java Snapshot builds of elasticsearch-java are no longer available. Using the current major highest version should be safe according to the compatibility guarantees described on https://github.com/elastic/elasticsearch-java?tab=readme-ov-file#compatibility --- plugins/examples/security-authorization-engine/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/examples/security-authorization-engine/build.gradle b/plugins/examples/security-authorization-engine/build.gradle index ea147cb730c5e..60fd1c2f1bc28 100644 --- a/plugins/examples/security-authorization-engine/build.gradle +++ b/plugins/examples/security-authorization-engine/build.gradle @@ -16,7 +16,7 @@ dependencies { testImplementation "org.elasticsearch.plugin:x-pack-core:${elasticsearchVersion}" javaRestTestImplementation "org.elasticsearch.plugin:x-pack-core:${elasticsearchVersion}" javaRestTestImplementation "org.apache.logging.log4j:log4j-core:${log4jVersion}" - javaRestTestImplementation("co.elastic.clients:elasticsearch-java:${elasticsearchVersion}") + javaRestTestImplementation "co.elastic.clients:elasticsearch-java:[9.0,10.0)" javaRestTestImplementation "org.elasticsearch.client:elasticsearch-rest-client:${elasticsearchVersion}" javaRestTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3' javaRestTestImplementation "org.elasticsearch.test:framework:${elasticsearchVersion}" From 4704fbcfb168d3fd0a784baea3eefc27f5c02c28 Mon Sep 17 00:00:00 2001 From: Mariusz Jozala Date: Tue, 29 Apr 2025 15:48:15 +0200 Subject: [PATCH 2/2] [Test] Reorganize Maven repository configuration in build.gradle Repo https://snapshots.elastic.co/maven/ is no longer needed in a composite build. Previously it was only used to provide snapshot version of `elasticsearch-java` client which is no longer available in snapshot version. We keep the https://snapshots.elastic.co/maven/ repo to be used when for non-composite builds when any other dependencies snapshot versions can be fetched. --- plugins/examples/build.gradle | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/plugins/examples/build.gradle b/plugins/examples/build.gradle index b60485edd1cb8..c5f75e71e4842 100644 --- a/plugins/examples/build.gradle +++ b/plugins/examples/build.gradle @@ -22,15 +22,6 @@ subprojects { repositories { // Only necessary when building plugins against SNAPSHOT versions of Elasticsearch - maven { - url = 'https://snapshots.elastic.co/maven/' - mavenContent { - if (gradle.includedBuilds) { - // When building in a composite, restrict this to only resolve the Java REST client - includeModule 'co.elastic.clients', 'elasticsearch-java' - } - } - } if (gradle.includedBuilds.isEmpty()) { maven { url = "https://artifacts-snapshot.elastic.co/elasticsearch/${elasticsearchVersion}/maven" @@ -38,6 +29,9 @@ subprojects { includeModule 'org.elasticsearch', 'elasticsearch' } } + maven { + url = 'https://snapshots.elastic.co/maven/' + } } // Same for Lucene, add the snapshot repo based on the currently used Lucene version