Using a Maven Repository from Nexus as Gradle Plugins repo

Hi,

I would like to use my private Nexus repo as the repo for resolving Gradle Plugins. I have added the relevant configuration in settings.gradle file of my project:

pluginManagement {
repositories {
maven {
name ‘myGradleRepo’
url ‘http://some-url/my-private-repo
}
}
}

The gradle build tries to connect to the correct URL as configured above. However, none of the plugin artifacts uploaded into the Nexus repo are resolving.
For example, I uploaded an artifact: Gradle - Plugin: com.github.ben-manes.versions with below parameters;

groupId: com.github.ben-manes
artifactId: gradle-versions-plugin
version: 0.20.0

To summarize, in short, how do I setup a Nexus repo to be used as Gradle Plugins Portal/Repo in an environment where there is no internet connectivity?

  1. How are you applying the plugin?
apply plugin: ...

or

plugins {
    id ...
}

You wrote

The gradle build tries to connect to the correct URL as configured above. However, none of the plugin artifacts uploaded into the Nexus repo are resolving.

  1. What is the error you see?
  2. If the error includes URLs tried by Gradle, does any of those seem like they should work, but they don’t?