slachiewicz opened a new pull request, #2123:
URL: https://github.com/apache/maven-resolver/pull/2123
Ports two `DefaultArtifactResolver` changes from `master` (#2080) to the
1.9.x line. `master` is on `Path` and a `ConfigurationKeys` class; 1.9.x is on
`File` with literal keys, so this is a port.
**Existence check for artifacts cached from another repository.** When an
artifact is present in the local repository but tracked for a repository that
is not in the current build context, 1.9.x issues a bare existence check
against the queried repository and, on success, registers the cached file for
it. No content is transferred, so the cached bytes are never compared against
that repository's checksums. The artifact is now downloaded again through the
regular transfer path, which applies the repository's checksum policy before
the registration is written. The previous behavior is available under
`aether.artifactResolver.existenceCheckRelabel=true`, documented in
`configuration.md`. The cost is one GET instead of one HEAD, in a situation
that already logs at INFO ("present in the local repository, but cached from a
remote repository ID that is unavailable").
**Snapshot normalization copy.** The base-version copy that snapshot
normalization writes next to a timestamped snapshot was not registered in the
tracking file, on either the download path or the local-hit path, so
`EnhancedLocalRepositoryManager` later treated it as a locally installed file.
Both paths now register the copy for the same repository as its source.
Tests cover the default download, the opt-in existence check, and the double
registration on a timestamped snapshot.
Verified: `mvn -pl maven-resolver-impl -am verify` -> BUILD SUCCESS, 386
tests in the module, 0 failures, 1 skipped (pre-existing); `spotless:apply`
produced no further changes.
*This change was created with AI assistance.*
--
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]