On Tue, Jul 1, 2008 at 5:48 PM, Hans Dockter <[EMAIL PROTECTED]> wrote:

> Hi Marko,
>
> On Jun 30, 2008, at 11:27 PM, Marko Bauhardt wrote:
>
>  Hi all,
>> i have a question how i can use a protected maven1 repository.
>> all dependencies are hosted on our internal maven repo which is running on
>> an apache web server and is protected with the basic authentication.
>>
>> So, i have add the urlResolver to the classpathResolvers
>>
>> ---
>> def urlResolver = new URLResolver()
>> urlResolver.addArtifactPattern("http://USERNAME:[EMAIL PROTECTED]
>> /[organisation]/[ext]s/[artifact]-[revision].[ext]")
>>
>> dependencies {
>>
>>  addMavenRepo()
>>  classpathResolvers.add(urlResolver)
>>
>> ...
>>
>> }
>> ---
>>
>>
>> In the console output this repository is printed out with the correct url,
>> but the no dependencies are downloaded.
>>
>
> The URLResolver does not accept such a notation. Unfortunately does it
> provide a user and userPassword property for basic authentication. I think
> you have to use the vfs resolvers.

That's a place where Ivy is not shining, but there's another option: use Ivy
CredentialsStore. sg like that should be working:
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials("My private
Repo Realm", "repohost", "username", "password");

HTH,

Xavier



> This is an optional jar of Ivy. Gradle has currently a classloader bug,
> therefore you can't use Ivy's optional jars at the moment. As you are
> working on a Mac, that the work around does not work for you. This bug will
> be fixed tonight or tomorrow morning. Than I will go more into detail how to
> work with vfs.
>
> - Hans
>
>
>> can anyone help?
>>
>> thanks
>> marko
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
> --
> Hans Dockter
> Gradle Project lead
> http://www.gradle.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Reply via email to