rmannibucau opened a new pull request, #2362:
URL: https://github.com/apache/maven-resolver/pull/2362

   ## Summary
   
   Follow-up to the discussion in https://github.com/apache/maven/pull/14083: 
implement origin-independent cached artifact reuse directly in Resolver rather 
than through a Maven-specific local repository manager decorator.
   
   - Add `aether.lrm.enhanced.ignoreAvailability`, with 
`aether.enhancedLocalRepository.ignoreAvailability` accepted as a 
lower-precedence alias.
   - When unset, automatically enable reuse for the stock unsplit local 
repository layout. Split layouts and custom prefix composer factories remain 
strict by default. An explicitly strict Resolver chain-tail policy suppresses 
automatic relaxation; an explicit enhanced-manager setting overrides the 
automatic policy.
   - In `applyTracking()`, accept tracked release artifacts after existing 
origin-matching checks fail, without attributing the artifact to an unrelated 
request repository.
   - Preserve provenance recording, matching-origin attribution, file existence 
and real-path checks, metadata handling, and chain ordering/write routing.
   - Conservatively exclude snapshots from the new fallback. Do not search 
other split-repository paths.
   
   ## Policy and compatibility
   
   This intentionally goes beyond the default-false suggestion in the Maven PR 
review: the common unsplit-cache case works automatically, without requiring 
users to opt in manually.
   
   Different repositories can serve different bytes at identical coordinates. 
The automatic policy trusts tracked cached releases across repository 
configuration changes. Set `aether.lrm.enhanced.ignoreAvailability=false` to 
disable the new fallback. Existing legacy-origin matching remains unchanged. 
For strict checking across all chain members, also disable the independent 
`aether.chainedLocalRepository.ignoreTailAvailability` bypass.
   
   Maven-specific configuration aliases are not interpreted by Resolver. 
Snapshots and metadata remain repository-sensitive; this does not guarantee 
offline snapshot resolution.
   
   ## Tests and documentation
   
   Add a 24-case policy matrix and regression coverage for persisted provenance 
across sessions, changed repository identity, explicit overrides and aliases, 
custom composers, snapshots, metadata, missing files, real-path validation, 
split-path isolation, chain ordering, independent tail bypass, and write 
routing. Document configuration precedence, trust implications, and migration 
away from the tracking-filename workaround.
   
   Validation performed locally with JDK 21:
   
   ```text
   mvn -B -pl maven-resolver-impl -am verify
   ```
   
   1,383 tests reported, zero failures or errors, 9 skipped. Formatting, 
Checkstyle, RAT, and `git diff --check` passed. The complete Resolver reactor 
and Maven CLI integration tests were not run.


-- 
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]

Reply via email to