Thanks for the quick reply! I just found a solution to the problem:

I was using http:// urls to access the repository. The proxy before the repo 
does http-to-https redirection (302 Moved, I think). After switching to 
https:// in settings.xml, downloading artefacts from m2e works again.


It's a bit strange that the same config worked with Eclipse Luna, however.



Mit freundlichem Gruß / Best regards



Michael Goth

znt Zentren für neue Technologien GmbH
Institut Burghausen
Mautnerstraße 268
D-84489 Burghausen

Hauptverwaltung und Sitz: Lena-Christ-Str. 2, 82031 Grünwald, Amtsgericht 
München HRB 179019
Geschäftsführer : Bernhard Marsoner, Ulrike Birnstiel
Prokuristen: Hans Mayer, Gerhard Schrottshamer



Office:  +49 86 77 98 80-12
Fax:       +49 86 77 98 80-9
E-Mail:  [email protected]<mailto:[email protected]>
Web:     http://www.znt-richter.com

Munich | Burghausen | Dresden | Villach/Austria | Singapore | Penang/Malaysia | 
San Francisco/USA

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese 
E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist 
nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden



________________________________
Von: [email protected] <[email protected]> im Auftrag 
von Igor Fedorenko <[email protected]>
Gesendet: Mittwoch, 8. Juli 2015 13:17
An: [email protected]
Betreff: Re: [m2e-users] m2e fails to download artifacts - Error 401 
Unauthorized

I am not aware of any problems with http auth in m2e 1.6, so this must be new 
bug/limitation. To help you troubleshoot this further, I will need tcp dump or 
similar of a failed authentication attempt (make sure you don't reveal 
passwords or any sensitive info!). m2e uses aether-connector-okhttp [1] for 
http/https support, so you can debug this yourself if you prefer.

[1] 
https://github.com/takari/aether-connector-okhttp<https://github.com/takari/aether-connector-okhttp>

--
Regards,
Igor


On Wed, Jul 8, 2015, at 05:39 AM, Goth, Michael wrote:

Hi,


since upgrading to Eclipse Mars, m2e fails to download any artifact from our 
internal Artifactory. The download works fine when building with Maven 3.3.3 
from the command line, so I assume my settings.xml is correct.


I always get "Error code 401, Unauthorized"


In Eclipse Luna, everything worked as expected.  I'm using a fresh workspace 
for Eclipse Mars, so maybe there's something I have to configure in Eclipse to 
get it to work again?


Here's a stacktrace from Eclipse's .log with the exception:



!SUBENTRY 1 org.eclipse.m2e.core 4 -1 2015-07-08 11:24:12.488
!MESSAGE Could not resolve artifact 
org.apache.cxf:cxf-rt-transports-http:jar:sources:2.7.11
!SUBENTRY 2 org.eclipse.m2e.core 4 -1 2015-07-08 11:24:12.488
!MESSAGE Could not transfer artifact 
org.apache.cxf:cxf-rt-transports-http:jar:sources:2.7.11 from/to central 
(http://mavenrepo/artifactory/central): Access denied to 
http://mavenrepo/artifactory/central/org/apache/cxf/cxf-rt-transports-http/2.7.11/cxf-rt-transports-http-2.7.11-sources.jar.
 Error code 401, Unauthorized
!STACK 0
org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer 
artifact org.apache.cxf:cxf-rt-transports-http:jar:sources:2.7.11 from/to 
central (http://mavenrepo/artifactory/central): Access denied to 
http://mavenrepo/artifactory/central/org/apache/cxf/cxf-rt-transports-http/2.7.11/cxf-rt-transports-http-2.7.11-sources.jar.
 Error code 401, Unauthorized
at 
io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:895)
at 
io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
at 
io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:673)
at 
io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:753)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:1)
at 
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at 
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at 
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:743)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:720)
at 
org.eclipse.m2e.jdt.internal.DownloadSourcesJob.download(DownloadSourcesJob.java:244)
at 
org.eclipse.m2e.jdt.internal.DownloadSourcesJob.downloadAttachments(DownloadSourcesJob.java:223)
at 
org.eclipse.m2e.jdt.internal.DownloadSourcesJob.downloadMaven(DownloadSourcesJob.java:197)
at 
org.eclipse.m2e.jdt.internal.DownloadSourcesJob.run(DownloadSourcesJob.java:153)
at 
org.eclipse.m2e.jdt.internal.DownloadSourcesJob$1.call(DownloadSourcesJob.java:136)
at 
org.eclipse.m2e.jdt.internal.DownloadSourcesJob$1.call(DownloadSourcesJob.java:1)
at 
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at 
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at 
org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1355)
at 
org.eclipse.m2e.jdt.internal.DownloadSourcesJob.run(DownloadSourcesJob.java:134)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: io.takari.aether.connector.AuthorizationException: Access denied to 
http://mavenrepo/artifactory/central/org/apache/cxf/cxf-rt-transports-http/2.7.11/cxf-rt-transports-http-2.7.11-sources.jar.
 Error code 401, Unauthorized
at 
io.takari.aether.connector.AetherRepositoryConnector.handleResponseCode(AetherRepositoryConnector.java:369)
at 
io.takari.aether.connector.AetherRepositoryConnector.access$8(AetherRepositoryConnector.java:363)
at 
io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:603)
at 
io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
at 
io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
... 24 more


Thanks!



Mit freundlichem Gruß / Best regards


Michael Goth

znt Zentren für neue Technologien GmbH
Institut Burghausen
Mautnerstraße 268
D-84489 Burghausen

Hauptverwaltung und Sitz: Lena-Christ-Str. 2, 82031 Grünwald, Amtsgericht 
München HRB 179019
Geschäftsführer : Bernhard Marsoner, Ulrike Birnstiel
Prokuristen: Hans Mayer, Gerhard Schrottshamer



Office:  +49 86 77 98 80-12
Fax:       +49 86 77 98 80-9
E-Mail:  [email protected]<mailto:[email protected]>
Web:     http://www.znt-richter.com


Munich | Burghausen | Dresden | Villach/Austria | Singapore | Penang/Malaysia | 
San Francisco/USA

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese 
E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist 
nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden


_______________________________________________
m2e-users mailing list
[email protected]<mailto:[email protected]>
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

_______________________________________________
m2e-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to