rmannibucau opened a new issue, #14082: URL: https://github.com/apache/maven/issues/14082
### Problem With a conventional unsplit local repository, changing the remote repositories available to a build can make an already cached artifact unavailable locally. The enhanced local repository manager consults `_remote.repositories` and requires a matching origin in the current resolution request, even though the artifact exists at the expected coordinates. This causes unnecessary remote verification/downloads and can prevent offline builds after repository or mirror configuration changes. It also affects chained local repositories; a chain is a composition mechanism and does not necessarily mean that the user opted into repository-origin isolation. A workaround is: ```sh -Daether.lrm.enhanced.trackingFilename=_remote.repositories.ignore ``` However, that only hides the previous tracking history and starts a new one; it is not a durable origin-independent cache policy. ### Expected behavior For an unsplit enhanced local repository, reuse an existing artifact by its coordinates without making its recorded remote origin part of artifact identity. Apply this independently to chain members, preserving lookup order and write routing. Keep provenance recording in the normal tracking file, as well as file existence and real-path checks. Preserve metadata lookup and snapshot version discovery behavior. Provide an explicit strict opt-out, retain strict defaults for split repositories, and respect explicitly configured tail availability policies. ### Proposed implementation This can be implemented entirely in Maven using the existing Resolver `LocalRepositoryManagerFactory` SPI: decorate the enhanced manager and accept an unavailable artifact result only when the delegate returned a validated existing path. No Resolver change or dependency upgrade is required. Proposed configuration: `maven.repo.local.ignoreAvailability`. ### Compatibility and trust implications Repositories can publish different bytes at the same coordinates. Origin-independent reuse therefore trusts artifacts already in the local cache across builds with different repository configurations. Users requiring origin isolation should retain strict checking or use isolated/split repositories. The behavior and opt-out must be documented explicitly. This does not guarantee offline snapshot builds, since required metadata or timestamped artifacts may still be missing. -- 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]
