GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MNG-5913] Allow defining aliases for existing server configurations in settings.xml by slawekjaranowski · Pull Request #12475 · apache/maven

Conversation

@slawekjaranowski

@slawekjaranowski slawekjaranowski commented Jul 12, 2026

Copy link
Copy Markdown
Member
  • [MNG-5913] Allow defining aliases for existing server configurations in settings.xml

Add the next tag aliases to the server in settings.xml

Additional server will be created in memory by SettingsBuilder, so the generated configuration should be transparent to other as Settings#getServers() will return complete list.

Based on commit 09b2dfc #2333


Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

  • I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
  • In any other case, please file an Apache Individual Contributor License Agreement.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@slawekjaranowski
[MNG-5913] Allow defining aliases for existing server configurations …
2bc92e3
…in settings.xml

* [MNG-5913] Allow defining aliases for existing server configurations in settings.xml

Add the next tag aliases to the server in settings.xml

Additional server will be created in memory by SettingsBuilder,
so the generated configuration should be transparent to other
as Settings#getServers() will return complete list.

Based on commit 09b2dfc apache#2333
@slawekjaranowski
slawekjaranowski requested review from cstamas and gnodet July 12, 2026 16:43
gnodet
gnodet approved these changes Jul 12, 2026
View reviewed changes

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: [MNG-5913] Server aliases backport to maven-3.10.x

Verdict: APPROVE ✅

Clean backport of the server aliases feature from master (#2333, merged) to the maven-3.10.x branch. The adaptation from Maven 4's immutable builder pattern to Maven 3's Modello-generated mutable classes is correctly done:

  • serverAlias() method uses server.clone() + setId(id) + setAliases(Collections.emptyList()) instead of the immutable Server.newBuilder() pattern — correct equivalent for Maven 3 model classes. clone() performs a deep copy including the DOM configuration field, so aliased servers get independent copies of credentials/config.
  • Model version correctly bumped from 1.2.0 to 1.3.0 with pluralExceptions for <alias> inside <aliases>.
  • Validation is identical to master — same alias uniqueness checks, same error messages, same Set<String> serverIds tracking.
  • Alias expansion correctly placed after validation but before downstream consumption in readSettingsFromString().
  • Collectors.toList() instead of .toList() — appropriate for Maven 3.10.x's Java compatibility baseline.
  • Test coverage is thorough: 4 expansion scenarios + 3 validator tests covering alias-equals-server-id, cross-server duplication, and empty alias values.

No security concerns — clone() creates independent copies, no shared-mutable-state risk.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gnodet added a commit to gnodet/maven that referenced this pull request Jul 12, 2026
@gnodet
chore: update PR review loop state — reviewed apache#12475
2139b1d
@slawekjaranowski slawekjaranowski linked an issue Jul 12, 2026 that may be closed by this pull request
[MNG-5913] Allow to define aliases for existing server configurations in settings.xml #7757
Closed
@slawekjaranowski slawekjaranowski added mvn3 enhancement New feature or request labels Jul 12, 2026
@slawekjaranowski slawekjaranowski self-assigned this Jul 12, 2026
@slawekjaranowski slawekjaranowski added this to the 3.10.0 milestone Jul 13, 2026
cstamas
cstamas approved these changes Jul 13, 2026
View reviewed changes
@slawekjaranowski
slawekjaranowski merged commit 713b643 into apache:maven-3.10.x Jul 13, 2026
18 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski
slawekjaranowski deleted the cp-2333-3.10 branch July 20, 2026 18:12
@sparsick sparsick mentioned this pull request Aug 5, 2026
Preparation for Maven 3.10.0 Release support-and-care/maven-support-and-care#211
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cstamas cstamas cstamas approved these changes
@gnodet gnodet gnodet approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@slawekjaranowski slawekjaranowski

Labels

enhancement New feature or request mvn3

Projects

None yet

Milestone

3.10.0

Development

Successfully merging this pull request may close these issues.

[MNG-5913] Allow to define aliases for existing server configurations in settings.xml

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@slawekjaranowski @cstamas @gnodet
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.