You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Raul Arabaolaza Barquin <ra...@mundivia.net> on 2008/07/15 08:56:08 UTC

Using Ivy with Apache archiva with Http authentication

Hi,

I´ve been triying to use Ivy with my Archiva repository using Ibiblio resolver, all works fine if i don´t need to authenticate (Archiva guest is a repository observer) but i´ve not been able to connect to a protected repository, i allways got authentication denied.

This is my ivy settings file:

<ivysettings>
  <settings defaultResolver="archiva" />
  <resolvers>
    <ibiblio name="archiva" m2compatible="true" root="http://localhost:8080/archiva/repository/ame4j/"/>   
  </resolvers>
</ivysettings>

This is my ivy file:

<ivy-module version="2.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation=
                   "http://ant.apache.org/ivy/schemas/ivy.xsd">
    <info organisation="MiOrganizacion" module="MiProyecto" />
    <dependencies>
        <dependency org="com.endesa.ame4j" rev="2008Q2" name="spring"/>
    </dependencies>
</ivy-module>

And in my build.xml i´ve tried:

<target name="resolve" description="--> retreive dependencies with ivy">

    <ivy:settings file="./ivysettings.xml">
	<credentials host="localhost"  realm="Myrealm" username="admin" passwd="temporal" />
    </ivy:settings>
    <ivy:retrieve />
</target> 

And i´ve also tried 

<target name="resolve" description="--> retreive dependencies with ivy">

    <ivy:settings file="./ivysettings.xml" username="admin" userpasswd="temporal">
    <ivy:retrieve />
</target>   

Neither worked, i allways got authentication errors. 

[ivy:retrieve] archiva: no latest strategy defined: using default
[ivy:retrieve]   trying http://localhost:8080/archiva/repository/ame4j/com/endes
a/ame4j/spring/2008Q2/spring-2008Q2.pom
[ivy:retrieve]          tried http://localhost:8080/archiva/repository/ame4j/com
/endesa/ame4j/spring/2008Q2/spring-2008Q2.pom
[ivy:retrieve] authentication: k='Repository Repositorio dependencias ame4j@loca
lhost' c='null'
[ivy:retrieve] CLIENT ERROR: Authorization+Denied%2E url=http://localhost:8080/a
rchiva/repository/ame4j/com/endesa/ame4j/spring/2008Q2/spring-2008Q2.pom
[ivy:retrieve] HTTP response status: 401 url=http://localhost:8080/archiva/repos
itory/ame4j/com/endesa/ame4j/spring/2008Q2/spring-2008Q2.pom
[ivy:retrieve]  archiva: resource not reachable for com/endesa/ame4j#spring;2008
Q2: res=http://localhost:8080/archiva/repository/ame4j/com/endesa/ame4j/spring/2
008Q2/spring-2008Q2.pom

Anyone has succesfully used a password protected archiva repository with Ivy?

Best Regards, Raúl  

------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------