Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-347

Shrinkwrap maven resolver doesn not support password prottected maven reposistory

XMLWordPrintable

    • Hide

      1. have password protected maven repo
      2. switch org.apache.maven.wagon for aether to wagon-http instead of wagon-http-lightweight as wagon-http-lightweight does not support basic authentication.
      3 MavenDependencyResolver does not honor authentication information in settings.xml fails with above stacktrace.

      Show
      1. have password protected maven repo 2. switch org.apache.maven.wagon for aether to wagon-http instead of wagon-http-lightweight as wagon-http-lightweight does not support basic authentication. 3 MavenDependencyResolver does not honor authentication information in settings.xml fails with above stacktrace.
    • Low

      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?

              sachin6870 Sachin Patil (Inactive)
              sachin6870 Sachin Patil (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: