-
Bug
-
Resolution: Done
-
Major
-
1.0.0-beta-5
-
None
Shrinkwrap maven resolver does not honor basic authentication mentioned in user settings.xml, if your are using password protected repository, maven artifact resolutions fails with following stack trace,
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact woodstox:wstx-asl:pom:3.2.1 from/to nexus (https://phobos.envista.com/mvn/content/groups/public): Not authorized.
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:975)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:966)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:707)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:701)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:452)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:456)
... 77 more
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Not authorized.
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:596)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:615)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
I have already fixed this at https://github.com/sachin6870/resolver/commit/b005ae8c500819ba5b5e12a94ee6c46795964d78.
Can you please verify this fix?