FrankChen021 opened a new pull request, #20386:
URL: https://github.com/apache/druid/pull/20386
### Description
Upgrades `org.apache.maven.resolver` from 1.3.1 to 2.0.23. A plain version
bump breaks the build because Resolver 2.0 removed the `ServiceLocator`
bootstrap API used by `PullDependencies` (the `pull-deps` CLI tool, the only
consumer of this dependency).
#### Migrated PullDependencies off the removed ServiceLocator API
Replaced the `DefaultServiceLocator`/`MavenRepositorySystemUtils` bootstrap
with `RepositorySystemSupplier`/`SessionBuilderSupplier` (from the new
`maven-resolver-supplier-mvn3` artifact). Using `SessionBuilderSupplier`
matters: it restores Maven's default scope-based dependency selection, without
which collection would eagerly walk into dependencies' own test-scope/optional
transitive graphs.
#### Updated dependency declarations
Bumped all `org.apache.maven.resolver` artifacts to 2.0.23, centrally
managed via a `maven.resolver.version` property in the root POM. Renamed
`maven-resolver-transport-http` to `maven-resolver-transport-apache` (renamed
upstream) and dropped `org.apache.maven:maven-resolver-provider`, superseded by
`maven-resolver-supplier-mvn3`.
#### Replaced javax.xml.bind.DatatypeConverter with java.util.HexFormat
`ExportMetadata` was the only reason `services` needed
`jakarta.xml.bind-api` directly. `java.util.HexFormat` covers the same hex
encode/decode without the extra dependency, with output kept byte-for-byte
identical via `HexFormat.of().withUpperCase()`.
<hr>
##### Key changed/added classes in this PR
* `PullDependencies`
* `PullDependenciesTest`
* `ExportMetadata`
<hr>
This PR has:
- [x] been self-reviewed.
- [x] added or updated version, license, or notice information in
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [x] added comments explaining the "why" and the intent of the code
wherever would not be obvious for an unfamiliar reader.
- [x] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for [code
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]