maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kent Granström (JIRA) <j...@apache.org>
Subject [jira] [Commented] (MDEP-579) Regression: get goal does not pass server credentials to BasicRepositoryConnector
Date Mon, 12 Aug 2019 05:49:00 GMT

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

Kent Granström commented on MDEP-579:
-------------------------------------

Hi [~pmoerenhout]

I have now cloned your branch and build it and tested it on some artifacts we have got and
unfortunatelly it appears not to work. Due to company policy I have had to replace certain
data... sorry for that but  this is what I get when I run it: (first the updated version
and den the original one)
{noformat}

[DEBUG] Configuring mojo org.apache.maven.plugins:maven-dependency-plugin:3.1.2-SNAPSHOT:get
from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-dependency-plugin:3.1.2-SNAPSHOT,
parent: sun.misc.Launcher$AppClassLoader@33909752]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:3.1.2-SNAPSHOT:get'
with basic configurator -->
[DEBUG] (f) artifact = com.test.note:note-docker:4.1:zip
[DEBUG] (s) packaging = jar
[DEBUG] (f) pomRemoteRepositories = [ id: nexus
 url: https://example.com/nexus/repository/public-repo
 layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => daily]
]
[DEBUG] (f) remoteRepositories = internal-repo-id::default::https://example.com/nexus/repository/internal-repo
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@682bd3c4
[DEBUG] (f) skip = false
[DEBUG] (f) transitive = false
[DEBUG] -- end configuration --
[INFO] Resolving com.test.note:note-docker:zip:4.1
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://example.com/nexus/repository/public-repo
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://example.com/nexus/repository/public-repo
with username=***, password=***
Downloading: https://example.com/nexus/repository/public-repo/com/test/note/note-docker/4.1/note-docker-4.1.pom
[DEBUG] Writing tracking file C:\Users\abcd\.m2\repository\com\test\note\note-docker\4.1\note-docker-4.1.pom.lastUpdated
[DEBUG] Skipped remote request for com.test.note:note-docker:pom:4.1, already updated during
this session.
[WARNING] The POM for com.test.note:note-docker:zip:4.1 is missing, no dependency information
available

[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://example.com/nexus/repository/public-repo
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://example.com/nexus/repository/public-repo
with username=***, password=***
Downloading: https://example.com/nexus/repository/public-repo/com/test/note/note-docker/4.1/note-docker-4.1.zip
[DEBUG] Writing tracking file C:\Users\abcd\.m2\repository\com\test\note\note-docker\4.1\note-docker-4.1.zip.lastUpdated
[DEBUG] Skipped remote request for com.test.note:note-docker:zip:4.1, already updated during
this session.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.206 s
[INFO] Finished at: 2019-08-12T07:21:20+02:00
[INFO] Final Memory: 17M/207M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2-SNAPSHOT:get
(default-cli) on project dummy-artifact: Couldn't download artifact: Could not find artifact
com.test.note:note-docker:zip:4.1 in nexus (https://example.com/nexus/repository/public-repo)
-> [Help 1]



ORIGINAL 3.1.1

[INFO] Resolving com.test.note:note-docker:zip:4.1
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://example.com/nexus/repository/public-repo
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://example.com/nexus/repository/public-repo
with username=***, password=***
Downloading: https://example.com/nexus/repository/public-repo/com/test/note/note-docker/4.1/note-docker-4.1.pom
[DEBUG] Writing tracking file C:\Users\abcd\.m2\repository\com\test\note\note-docker\4.1\note-docker-4.1.pom.lastUpdated

[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://example.com/nexus/repository/internal-repo
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://example.com/nexus/repository/internal-repo
Downloading: https://example.com/nexus/repository/internal-repo/com/test/note/note-docker/4.1/note-docker-4.1.pom
[DEBUG] Writing tracking file C:\Users\abcd\.m2\repository\com\test\note\note-docker\4.1\note-docker-4.1.pom.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.162 s
[INFO] Finished at: 2019-08-12T07:26:33+02:00
[INFO] Final Memory: 17M/168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get
(default-cli) on project dummy-artifact: Couldn't download artifact: Failed to read artifact
descriptor for com.test.note:note-docker:zip:4.1:
Could not transfer artifact com.test.note:note-docker:pom:4.1 from/to internal-repo-id (https://example.com/nexus/repository/internal-repo):
Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
{noformat}
>From what I gather the difference is that in your case the creds are passed to our repo
manager (Nexus) but it is for the public-repo (not the internal-repo that also require creds)

 

 

> 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)

Mime
View raw message