Http authentication between using ant / ivy to get nexus dependency?

I had a problem trying to get a dependency on the nexus repository when running ant with ivy. the dependency is never resolved; when run with verbose output, the suspicious string is the authentication "[ivy: getting]: k = '@' c = 'null'."

I tried many different options for providing credential configuration to ivy, but without changing the result. Still the stranger repo hostname appears from the recognizer, and not from the provided credentials.

Versions - ANT @ 1.7.1, IVY@2.1.0 , JDK@1.6.0 _20

A note was made to make sure that commons-httpclient in on the class path allows HTTP authentication, which I am sure is, although it was not possible to explicitly confirm.

Any help is greatly appreciated.

+5
source share
1 answer

Are you getting HTTP 401 error? This will indicate problems with the credentials that are used to log in to Nexus.

You can fix it by adding the credentials entry in the ivy settings file:

<credentials host="${nexus.host}" realm="Sonatype Nexus Repository Manager" username="${nexus.user}" passwd="${nexus.pass}" />  

As a result, you must specify the correct Nexus security scope.

+3
source

All Articles