[ https://issues.apache.org/jira/browse/MNG-8380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17898695#comment-17898695 ]
Tamas Cservenak commented on MNG-8380: -------------------------------------- What about something like this: {noformat} <settings> <server> <id>myserver</id> <aliases> <alias>comp1</alias> <alias>comp2</alias> </aliases> ... </server> </settings> {noformat} As basically this would be "almost" as before: server ID must be unique, but aliases may even overlap, but selection is still possible in "maven way": use the order of server entries in effective settings. > Allow Repositories and Mirrors To Delegate Credentials To A <server> > -------------------------------------------------------------------- > > Key: MNG-8380 > URL: https://issues.apache.org/jira/browse/MNG-8380 > Project: Maven > Issue Type: Improvement > Components: Artifacts and Repositories, Settings > Affects Versions: 3.9.9 > Reporter: Robert Krajewski > Priority: Major > Labels: DRY, credentials, mirror, mirrorOf, repository, servers, > settings > > As far as I can tell from the current documentation and the behavior of Maven > 3.9.9, mirrors and repositories need authentication are still obliged to rely > on a server element of the same id as the repository for each repository or > mirror that needs credentials. If this is not the case, please document a > solution that does not require such repetition, otherwise please take a look > at the discussion at > [https://stackoverflow.com/questions/17511469/setting-a-single-server-credentials-in-maven-for-multiple-repositories] > If there is no proposal, what I'd suggest is that an element like > <referenceServerId> (or something like that) contained in a <mirror> or > <repository> element, which if present, directs Maven to use the credentials > used in the referenced <server> with the <id> given by <referenceServerId>. > That server *must* be present in the settings environment. Otherwise the > older behavior of using a <server> with the same <id> as the mirror or > repository applies. -- This message was sent by Atlassian Jira (v8.20.10#820010)