Skip to content

[Backport 8.17] Using fixed minor version of rest-client - 8 #1013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -162,33 +162,6 @@ publishing {
developerConnection.set("scm:git:ssh://git@github.com:elastic/elasticsearch-java.git")
url.set("https://github.com/elastic/elasticsearch-java/")
}

withXml {
// Set the version of dependencies of the org.elasticsearch.client group to the one that we are building.
// Since the unified release process releases everything at once, this ensures all published artifacts depend
// on the exact same version. This assumes of course that the binary API and the behavior of these dependencies
// are the same as the one used in the dependency section below.
val xPathFactory = javax.xml.xpath.XPathFactory.newInstance()
val depSelector = xPathFactory.newXPath()
.compile("/project/dependencies/dependency[groupId/text() = 'org.elasticsearch.client']")
val versionSelector = xPathFactory.newXPath().compile("version")

var foundVersion = false;

val deps = depSelector.evaluate(asElement().ownerDocument, javax.xml.xpath.XPathConstants.NODESET)
as org.w3c.dom.NodeList

for (i in 0 until deps.length) {
val dep = deps.item(i)
val version = versionSelector.evaluate(dep, javax.xml.xpath.XPathConstants.NODE) as org.w3c.dom.Element
foundVersion = true;
version.textContent = project.version.toString()
}

if (!foundVersion) {
throw GradleException("Could not find a 'org.elasticsearch.client' to update dependency version in the POM.")
}
}
}
}
}
Expand All @@ -204,7 +177,7 @@ signing {
dependencies {
// Compile and test with the last 7.x version to make sure transition scenarios where
// the Java API client coexists with a 7.x HLRC work fine
val elasticsearchVersion = "8.10.0"
val elasticsearchVersion = "8.17.0"
val jacksonVersion = "2.17.0"
val openTelemetryVersion = "1.29.0"

Expand Down