gnodet commented on code in PR #2333:
URL: https://github.com/apache/maven/pull/2333#discussion_r3458171935
##########
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultSettingsBuilder.java:
##########
@@ -205,6 +205,10 @@ private Settings readSettings(
settingsValidator.validate(settings, isProjectSettings, problems);
+ if (!isProjectSettings) {
+ settings =
settings.withServers(serversByIds(settings.getServers()));
+ }
+
if (isProjectSettings) {
Review Comment:
Nit: these two blocks are mutually exclusive — combining into `if/else`
would make that obvious.
```suggestion
} else {
```
##########
compat/maven-settings/pom.xml:
##########
@@ -75,7 +75,7 @@ under the License.
<model>src/main/mdo/settings.mdo</model>
</models>
<params>
- <param>forcedIOModelVersion=1.2.0</param>
+ <param>forcedIOModelVersion=1.3.0</param>
Review Comment:
The `compat/maven-settings` module is missing `<pluralExceptions>` in its
modello configuration — both `api/maven-api-settings/pom.xml` and
`impl/maven-support/pom.xml` have it:
```xml
<pluralExceptions>
<aliases>alias</aliases>
</pluralExceptions>
```
Without it, modello auto-depluralize "aliases" by stripping the trailing
`s`, producing `addAliase()` / `removeAliase()` instead of the correct
`addAlias()` / `removeAlias()`. The tests already confirm this — they call
`server.addAliase(...)`. Once this ships in a release, that method name becomes
permanent public API.
The XML parsing is unaffected (the reader/writer in maven-support has the
correct config and uses `<alias>`), but the compat Java API will have an
ungrammatical method name forever.
--
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]