maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MDEP-579) Regression: get goal does not pass server credentials to BasicRepositoryConnector
Date Fri, 05 Jul 2019 08:13:00 GMT

    [ https://issues.apache.org/jira/browse/MDEP-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879057#comment-16879057
] 

Robert Scholte commented on MDEP-579:
-------------------------------------

https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java#L233-L235

I looks like this part is missing. When Maven starts up these calls are automatically done
for the preconfigured repos. However, in this case they are added via a plugin parameter,
so this needs to be done by the plugin code. If the implementation depends on the Aether version
(Sonatype or Eclipse), the logic should be moved to maven-artifact-transfer.

> 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
>
> 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.3#76005)

Mime
View raw message