[ https://issues.apache.org/jira/browse/MDEP-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16907849#comment-16907849 ]
Pim Moerenhout commented on MDEP-579: ------------------------------------- Hi [~kentgran], I have setup the setup you've described, using a Nexus docker image as mirror of public with authentication, together with a private repository. However, I did change the mirrorOf property of the nexus mirror to *,!internal-repo-id, as this property must contain the id. See [Settings reference|https://maven.apache.org/settings.html#Mirrors]. With the setup described, the artifact could be get, from the internal repository, with the correct authentication. Before the get, I delete the artifact from the local repository in the .m2/repo folder. In the failure log, the message is _Could not find artifact com.test.note:note-docker:zip:4.1 in nexus_. It's not mentioning that the authentication failed. Could you verify in the real setup how the mirrorOf is specified ? If it still fails, I could setup the docker image to hold the 2 repositories, as next step. > Regression: get goal does not pass server credentials to > BasicRepositoryConnector > --------------------------------------------------------------------------------- > > Key: MDEP-579 > URL: https://issues.apache.org/jira/browse/MDEP-579 > Project: Maven Dependency Plugin > Issue Type: Bug > Components: get > Affects Versions: 3.0.0, 3.0.1 > Reporter: Richard W. Eggert II > Priority: Critical > Labels: credentials > Time Spent: 10m > Remaining Estimate: 0h > > The {{get}} goal does not pass the server credentials from {{settings.xml}} > to the {{BasicRepositoryConnector}} in version 3.0.1 (and, presumably 3.0.0), > resulting in {{NotAuthorized}} errors when resolving artifacts against > repositories that require authentication. It works correctly in version 2.9. > Background: I discovered this in the course of debugging a Jenkins job in > which I'm using the {{get}} and {{copy}} goals from the command line (with no > POM) to download artifacts to deploy. After spending several hours thinking > that Jenkins was not properly configuring {{settings.xml}}, I noticed from > the Maven debug output that the credentials were being passed when resolving > the maven-dependency-plugin and its dependencies, but not being passed when > resolving the artifact I requested. On a hunch I downgraded from > maven-dependency-plugin version 3.0.1 to 2.9, and suddenly everything > magically worked. -- This message was sent by Atlassian JIRA (v7.6.14#76016)