0 Replies Latest reply: Oct 19, 2011 11:59 PM by Sachin Patil RSS

    shrinkwrap maven resolver doesn not support password prottected maven reposistory

    Sachin Patil Newbie

        We have our internally setup password protected nexus maven respositry with basic authentication. I am trying to setup arquillian in our one of the

      project. I am using MavenDependencyResolver in my test cases. I have managed to switch sonatype-aether to wagon-http instead of wagon-http-lightweight through my project's maven pom.

       

      I was running in to following exception while runing test cases, I have fixed this issue at https://github.com/sachin6870/resolver/commit/b005ae8c500819ba5b5e12a94ee6c46795964d78

         

      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)

          at java.lang.Thread.run(Thread.java:662)

       

      Please let me know if there is any other way to fix this.

       

      Thanks,

       

      -- Sachin.