Skip to content

Commit a3b8173

Browse files
committed
Fix dependencies + pom building (#1010)
* fix dependencies + pom building * add spdx
1 parent 54d8629 commit a3b8173

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

java-client/build.gradle.kts

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -162,29 +162,6 @@ publishing {
162162
developerConnection.set("scm:git:ssh://[email protected]:elastic/elasticsearch-java.git")
163163
url.set("https://github.com/elastic/elasticsearch-java/")
164164
}
165-
166-
withXml {
167-
// Note: org.elasticsearch.client is now an optional dependency, so the below is no more useful.
168-
// It's kept in case it ever comes back as a required dependency.
169-
170-
// Set the version of dependencies of the org.elasticsearch.client group to the one that we are building.
171-
// Since the unified release process releases everything at once, this ensures all published artifacts depend
172-
// on the exact same version. This assumes of course that the binary API and the behavior of these dependencies
173-
// are the same as the one used in the dependency section below.
174-
val xPathFactory = javax.xml.xpath.XPathFactory.newInstance()
175-
val depSelector = xPathFactory.newXPath()
176-
.compile("/project/dependencies/dependency[groupId/text() = 'org.elasticsearch.client']")
177-
val versionSelector = xPathFactory.newXPath().compile("version")
178-
179-
val deps = depSelector.evaluate(asElement().ownerDocument, javax.xml.xpath.XPathConstants.NODESET)
180-
as org.w3c.dom.NodeList
181-
182-
for (i in 0 until deps.length) {
183-
val dep = deps.item(i)
184-
val version = versionSelector.evaluate(dep, javax.xml.xpath.XPathConstants.NODE) as org.w3c.dom.Element
185-
version.textContent = project.version.toString()
186-
}
187-
}
188165
}
189166
}
190167
}
@@ -200,7 +177,7 @@ signing {
200177
dependencies {
201178
// Compile and test with the last 8.x version to make sure transition scenarios where
202179
// the Java API client coexists with a 8.x HLRC work fine
203-
val elasticsearchVersion = "8.17.0"
180+
val elasticsearchVersion = "9.0.0"
204181
val jacksonVersion = "2.18.3"
205182
val openTelemetryVersion = "1.29.0"
206183

@@ -209,7 +186,9 @@ dependencies {
209186
compileOnly("org.elasticsearch.client", "elasticsearch-rest-client", elasticsearchVersion)
210187
testImplementation("org.elasticsearch.client", "elasticsearch-rest-client", elasticsearchVersion)
211188

212-
api("org.apache.httpcomponents.client5","httpclient5","5.4")
189+
// Apache 2.0
190+
// https://hc.apache.org/httpcomponents-client-ga/
191+
api("org.apache.httpcomponents.client5","httpclient5","5.4.4")
213192

214193
// Apache 2.0
215194
// https://search.maven.org/artifact/com.google.code.findbugs/jsr305
@@ -224,6 +203,10 @@ dependencies {
224203
// https://github.com/eclipse-ee4j/parsson
225204
api("org.eclipse.parsson:parsson:1.1.7")
226205

206+
// Apache 2.0
207+
// http://commons.apache.org/logging/
208+
api("commons-logging:commons-logging:1.3.5")
209+
227210
// OpenTelemetry API for native instrumentation of the client.
228211
// Apache 2.0
229212
// https://github.com/open-telemetry/opentelemetry-java
@@ -292,6 +275,7 @@ class SpdxReporter(val dest: File) : ReportRenderer {
292275
"The Apache License, Version 2.0" to "Apache-2.0",
293276
"Apache License, Version 2.0" to "Apache-2.0",
294277
"The Apache Software License, Version 2.0" to "Apache-2.0",
278+
"Apache-2.0" to "Apache-2.0",
295279
"MIT License" to "MIT",
296280
"BSD Zero Clause License" to "0BSD",
297281
"Eclipse Public License 2.0" to "EPL-2.0",

0 commit comments

Comments
 (0)