torsten-liermann opened a new pull request, #2227:
URL: https://github.com/apache/maven-resolver/pull/2227

   Backport of the master change for #2225 to `maven-resolver-1.9.x`.
   
   Same change as on master: build-supplied repositories that already list 
mirrored repositories are not subjected to mirror selection again. Proxy and 
authentication selection and merging still apply, and repositories declared by 
a remote artifact descriptor still go through mirror selection, as before. The 
Javadoc of `newResolutionRepositories` and of both `aggregateRepositories` 
overloads states the rule. The regression tests use JUnit 4.
   
   Resolver 1.9.27 repeats the selection through the public API as described in 
the issue. Maven 3.9.16, which bundles 1.9.27, keeps the first selection in the 
three Maven builds from the issue, and no class outside Resolver in its 
distribution references `newResolutionRepositories`. Plugins and extensions 
that pass prepared repositories to `newResolutionRepositories` get the repeated 
selection on this line.
   
   Compatibility: such callers keep the first mirror selection, also after a 
session or selector change. Where the mirror selector matches the selected 
mirror itself, the result can differ from today in its mirrored repositories, 
target server, blocked state and number of repositories; a repository blocked 
by the first selection stays blocked. Callers that want a new mirror decision 
must pass the original repository definitions.
   
   Validation: in the earlier regression control on this same patch, with the 
unchanged `DefaultRemoteRepositoryManager`, 7 of the 22 tests in 
`DefaultRemoteRepositoryManagerTest` and `DefaultRepositorySystemTest` failed. 
A fresh `-pl maven-resolver-impl -am clean verify` run passes (812 tests, one 
existing skip), including all 22 tests in these two classes. `spotless:check` 
passes across all modules. A full reactor build and the integration tests were 
not run.
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


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