Nexus download with credentials

Hello,

I’m using Nexus and I want Gradle to use an user with password for downloading the dependencies.

This is my repository configuration:

repositories {

mavenRepo name: ‘Nexus’, url: “http://$nexusServer:$nexusPort/nexus/content/groups/public” }

How can I apply the credentials?

Regards

Have a look in the gradle userguide at http://gradle.org/docs/current/userguide/dependency_management.html#mavenLikeRepo

there is an example on how to pass credentials to your repository definition

Thanks for the qick response. Now it works!