[ https://issues.apache.org/jira/browse/MNG-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17710859#comment-17710859 ]
Nils Breunese commented on MNG-5659: ------------------------------------ The username from my example was a project-specific username, not a developer-specific one, and the credentials were indeed injected via environment variables, but let's ignore that example for now. There may be a better solution to our needs that I am not aware of which doesn't require per-project settings, which I'd love to learn about. Our main need is having each project use the appropriate artifact repository (or sometimes repositories). We have a central private artifact repository, which stores our build artifacts and proxies Maven Central and other approved Maven repositories. This is currently the only artifact repository that our build pipelines can access, but developers will sometimes want to build a project locally that requires other artifact repositories, e.g. a third-party GitHub project or an experimental Proof of Concept project which requires dependencies from a repository that hasn't been added to our in-company artifact repository yet. A global settings file that defaults to our private artifact repository would interfere with such local builds. You mentioned "(...) for alternative repositories use either a setting profile or a project profile". What do you mean by this exactly and can you explain how these be used to accomplish what I described above? > Project specific settings.xml > ----------------------------- > > Key: MNG-5659 > URL: https://issues.apache.org/jira/browse/MNG-5659 > Project: Maven > Issue Type: New Feature > Components: FDPFC > Reporter: Joachim Van der Auwera > Priority: Major > Fix For: Issues to be reviewed for 4.x > > Attachments: mvn.patch > > > It would be useful to have a settings.xml file next to the project pom that > could contain project specific settings. For example, when switching between > projects it is sometimes necessary to also change the location of the local > repository, or use a different set of repositories and/or mirror settings for > each project. > If a settings.xml file could be included with a project checkout, then the > repositories needed for the build could be included (instead of putting them > in the pom) along with any other project specific settings. > The tricky part is intelligently handling multi-module projects. For a > multi-module project I don't want to include a separate settings.xml file for > each directory. So Maven could recursively check each parent directory until > it either (1) finds a settings.xml, (2) finds a directory with no pom.xml, or > (3) finds the root directory. -- This message was sent by Atlassian Jira (v8.20.10#820010)