You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rares Vernica <rv...@gmail.com> on 2015/02/24 00:53:56 UTC

Download dependency for protected repository

Hello,

I am using Maven 3.0.4 and I have problems downloading artifacts from
repositories which require authentication. I provide the username and
password in the setting file but they are not picked up.

Here is what I get:

>mvn complie
...
Caused by: org.apache.maven.wagon.authorization.AuthorizationException:
Access denied to: [...URL...]
        at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:119)


I am confident that the setting are correct in the setting file because the
same setting work file if I use the Maven plugin in Eclipse. When I build
the project from Eclipse I can download the dependencies just fine.

Here is what I use in the settings.xml file:

 <servers>
  <server>
   <id>...</id>
   <username>...</username>
   <password>...</password>
  </server>


Could it be that the Eclipse plugin uses a different Wagon provider which
is able to pick-up the credentials properly? If so, how could I swap the
provider in mvn the command line?

Thanks!
Rares