slachiewicz opened a new pull request, #13835:
URL: https://github.com/apache/maven/pull/13835

   Follow-up to #13265 (server `<repositoryOrigins>` and credential scoping), 
in four commits:
   
   1. **Session extenders get the origin-bound selector.** 
`DefaultRepositorySystemSessionFactory` passes the 
`RepositorySystemSessionExtender`s the same `OriginBoundAuthenticationSelector` 
that resolver gets, so `LegacyRepositorySystemSessionExtender` applies 
`maven.repository.credentialScope` and `<repositoryOrigins>` to the legacy 
`ArtifactRepository` objects too. Unit test in 
`DefaultRepositorySystemSessionFactoryTest`.
   2. **Settings problems without `-e`.** Maven 4 printed only "N problems were 
encountered while building the effective settings (use -e to see details)". 
Maven 3 prints every settings problem at WARNING; this does the same and keeps 
the exception for `-e`, so an unknown or misspelt element shows up.
   3. **`ApiRunner` uses the same selector.** 
`OriginBoundAuthenticationSelector` and its test move from maven-core to 
maven-impl, so the standalone `ApiRunner` applies the origins of the settings 
mirrors, repositories and `<server><repositoryOrigins>`, with the same 
credential scope property as the CLI. New `ApiRunnerSettingsTest`.
   4. **Core IT `MavenITgh13265ServerRepositoryOriginsTest`.** #13265 had unit 
tests only. Two password-protected repositories on two localhost ports; the IT 
covers the declared origin and another origin with the same id in `origin` and 
`strict` scope, a server without `<repositoryOrigins>`, an alias inheriting the 
origins, and an unknown element under `<server>` reported at WARNING without 
`-e`.
   
   Verified: `DefaultRepositorySystemSessionFactoryTest` (17), 
`OriginBoundAuthenticationSelectorTest` (7) and `ApiRunnerSettingsTest` (17) 
pass; spotless passes. The new core IT runs in CI; I did not run the core ITs 
locally.
   
   Backport to `maven-4.0.x`: BACKPORT.
   
   ## Checklist
   
   - [x] Your pull request should address just one issue, without pulling in 
other changes.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Each commit in the pull request should have a meaningful subject line 
and body.
   - [x] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied.
   - [x] Run `mvn verify` to make sure basic checks pass.
   - [ ] You have run the [Core IT][core-its] successfully.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


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