Thanks for the quick reply.  Your suggestion did not work for me.  Gradle
still tells me that my dependency is unresolved.  It outputs the URL of the
artifact that it is trying to access, and I am able to download that
artifact if I paste the URL as an argument to wget on the command line.  It
just doesn't work from Gradle.  Any other suggestions?


Tom Eyckmans wrote:
> 
> Hi,
> 
> there are currently no functions that allow you to specify the username
> and
> password through separate parameters, but what you could try is pass the
> username and password in the URL; you probably don't want to put your
> username / password in the build script so you could to the following:
> 
> put the following in a gradle.properties file in
> USER_HOME/.gradle/gradle.properties:
> 
> internalRepoUsername = yourUser
> internalRepoPassword  = yourPassword
> 
> and the following in your build.gradle:
> 
> dependencies {
>     addMavenStyleRepo('internal',
>         "http://${internalRepoUsername}:${
> [email protected]/repository/internal/"
>     )
> }
> 
> Note the double quotes in the repository URL.
> 
> 2009/3/9 kweiner <[email protected]>
> 
>>
>> How can I add a Maven 2 repository that is protected by basic
>> authentication?
>> I currently have the following, but I don't know where to put the user
>> name
>> and password.
>>
>> dependencies {
>>    addMavenStyleRepo('internal',
>> 'http://my.server.com/repository/internal/')
>> }
>>
>> Thanks.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Maven-2-repository-basic-authentication-tp22423421p22423421.html
>> Sent from the gradle-user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-2-repository-basic-authentication-tp22423421p22427199.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to