apache / apache/maven

[MNG-8380] Allow Repositories and Mirrors To Delegate Credentials To A <server>

Open
#10,248 7 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Robert Krajewski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=krajewski)** opened **[MNG-8380](https://issues.apache.org/jira/browse/MNG-8380?redirect=false)** and commented

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 \ (or something like that) contained in a \ or \ element, which if present, directs Maven to use the credentials used in the referenced \ with the \ given by \. That server **must** be present in the settings environment. Otherwise the older behavior of using a \ with the same \ as the mirror or repository applies.

---

**Affects:** 3.9.9

**Issue Links:**
- [MNG-5585](https://issues.apache.org/jira/browse/MNG-5585) match server credentials based on server realm
(_**"duplicates"**_)
- [MNG-5913](https://issues.apache.org/jira/browse/MNG-5913) Allow to define aliases for existing server configurations in settings.xml

- [MNG-8381](https://issues.apache.org/jira/browse/MNG-8381) Allow server.aliases in settings.xml

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.