@@ -160,6 +160,9 @@ publishing {
160
160
}
161
161
162
162
withXml {
163
+ // Note: org.elasticsearch.client is now an optional dependency, so the below is no more useful.
164
+ // It's kept in case it ever comes back as a required dependency.
165
+
163
166
// Set the version of dependencies of the org.elasticsearch.client group to the one that we are building.
164
167
// Since the unified release process releases everything at once, this ensures all published artifacts depend
165
168
// on the exact same version. This assumes of course that the binary API and the behavior of these dependencies
@@ -169,21 +172,14 @@ publishing {
169
172
.compile(" /project/dependencies/dependency[groupId/text() = 'org.elasticsearch.client']" )
170
173
val versionSelector = xPathFactory.newXPath().compile(" version" )
171
174
172
- var foundVersion = false ;
173
-
174
175
val deps = depSelector.evaluate(asElement().ownerDocument, javax.xml.xpath.XPathConstants .NODESET )
175
176
as org.w3c.dom.NodeList
176
177
177
178
for (i in 0 until deps.length) {
178
179
val dep = deps.item(i)
179
180
val version = versionSelector.evaluate(dep, javax.xml.xpath.XPathConstants .NODE ) as org.w3c.dom.Element
180
- foundVersion = true ;
181
181
version.textContent = project.version.toString()
182
182
}
183
-
184
- if (! foundVersion) {
185
- throw GradleException (" Could not find a 'org.elasticsearch.client' to update dependency version in the POM." )
186
- }
187
183
}
188
184
}
189
185
}
@@ -198,15 +194,16 @@ signing {
198
194
}
199
195
200
196
dependencies {
201
- // Compile and test with the last 7 .x version to make sure transition scenarios where
202
- // the Java API client coexists with a 7 .x HLRC work fine
197
+ // Compile and test with the last 8 .x version to make sure transition scenarios where
198
+ // the Java API client coexists with a 8 .x HLRC work fine
203
199
val elasticsearchVersion = " 8.17.0"
204
- val jacksonVersion = " 2.17.0 "
200
+ val jacksonVersion = " 2.18.3 "
205
201
val openTelemetryVersion = " 1.29.0"
206
202
207
203
// Apache 2.0
208
204
// https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low.html
209
- api(" org.elasticsearch.client" , " elasticsearch-rest-client" , elasticsearchVersion)
205
+ compileOnly(" org.elasticsearch.client" , " elasticsearch-rest-client" , elasticsearchVersion)
206
+ testImplementation(" org.elasticsearch.client" , " elasticsearch-rest-client" , elasticsearchVersion)
210
207
211
208
api(" org.apache.httpcomponents.client5" ," httpclient5" ," 5.4" )
212
209
@@ -216,38 +213,34 @@ dependencies {
216
213
217
214
// EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
218
215
// https://github.com/eclipse-ee4j/jsonp
219
- api(" jakarta.json:jakarta.json-api:2.0.1 " )
216
+ api(" jakarta.json:jakarta.json-api:2.1.3 " )
220
217
221
218
// Needed even if using Jackson to have an implementation of the Jsonp object model
222
219
// EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
223
220
// https://github.com/eclipse-ee4j/parsson
224
- api(" org.eclipse.parsson:parsson:1.0.5 " )
221
+ api(" org.eclipse.parsson:parsson:1.1.7 " )
225
222
226
223
// OpenTelemetry API for native instrumentation of the client.
227
224
// Apache 2.0
228
225
// https://github.com/open-telemetry/opentelemetry-java
229
226
implementation(" io.opentelemetry" , " opentelemetry-api" , openTelemetryVersion)
230
227
// Use it once it's stable (see Instrumentation.java). Limited to tests for now.
231
228
testImplementation(" io.opentelemetry" , " opentelemetry-semconv" , " $openTelemetryVersion -alpha" )
229
+ testImplementation(" io.opentelemetry" , " opentelemetry-sdk" , openTelemetryVersion)
232
230
233
231
// EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
234
232
// https://github.com/eclipse-ee4j/jsonb-api
235
- compileOnly(" jakarta.json.bind" , " jakarta.json.bind-api" , " 2 .0.0 " )
236
- testImplementation(" jakarta.json.bind" , " jakarta.json.bind-api" , " 2 .0.0 " )
233
+ compileOnly(" jakarta.json.bind" , " jakarta.json.bind-api" , " 3 .0.1 " )
234
+ testImplementation(" jakarta.json.bind" , " jakarta.json.bind-api" , " 3 .0.1 " )
237
235
238
236
// Apache 2.0
239
237
// https://github.com/FasterXML/jackson
240
- compileOnly(" com.fasterxml.jackson.core" , " jackson-core" , jacksonVersion)
241
- compileOnly(" com.fasterxml.jackson.core" , " jackson-databind" , jacksonVersion)
242
- testImplementation(" com.fasterxml.jackson.core" , " jackson-core" , jacksonVersion)
243
- testImplementation(" com.fasterxml.jackson.core" , " jackson-databind" , jacksonVersion)
238
+ implementation(" com.fasterxml.jackson.core" , " jackson-core" , jacksonVersion)
239
+ implementation(" com.fasterxml.jackson.core" , " jackson-databind" , jacksonVersion)
244
240
245
241
// EPL-2.0 OR BSD-3-Clause
246
242
// https://eclipse-ee4j.github.io/yasson/
247
- testImplementation(" org.eclipse" , " yasson" , " 2.0.4" ) {
248
- // Exclude Glassfish as we use Parsson (basically Glassfish renamed in the Jakarta namespace).
249
- exclude(group = " org.glassfish" , module = " jakarta.json" )
250
- }
243
+ testImplementation(" org.eclipse" , " yasson" , " 3.0.4" )
251
244
252
245
// Apache-2.0
253
246
testImplementation(" commons-io:commons-io:2.17.0" )
@@ -268,8 +261,6 @@ dependencies {
268
261
// updating transitive dependency from testcontainers
269
262
testImplementation(" org.apache.commons" ," commons-compress" ," 1.26.1" )
270
263
271
- testImplementation(" io.opentelemetry" , " opentelemetry-sdk" , openTelemetryVersion)
272
-
273
264
// Apache-2.0
274
265
// https://github.com/awaitility/awaitility
275
266
testImplementation(" org.awaitility" , " awaitility" , " 4.2.0" )
@@ -324,10 +315,15 @@ class SpdxReporter(val dest: File) : ReportRenderer {
324
315
val depName = dep.group + " :" + dep.name
325
316
326
317
val info = LicenseDataCollector .multiModuleLicenseInfo(dep)
327
- val depUrl = if (depName.startsWith(" org.apache.httpcomponents" )) {
328
- " https://hc.apache.org/"
329
- } else {
330
- info.moduleUrls.first()
318
+ val depUrl = when (dep.group) {
319
+ " org.apache.httpcomponents.client5" -> " https://hc.apache.org/"
320
+ " org.apache.httpcomponents.core5" -> " https://hc.apache.org/"
321
+ " com.fasterxml.jackson" -> " https://github.com/FasterXML/jackson"
322
+ else -> if (info.moduleUrls.isEmpty()) {
323
+ throw RuntimeException (" No URL found for module '$depName '" )
324
+ } else {
325
+ info.moduleUrls.first()
326
+ }
331
327
}
332
328
333
329
val licenseIds = info.licenses.mapNotNull { license ->
0 commit comments