I’m trying to run a gradle build within a heavily firewalled corporate environment. I’ve set up an Artifactory which proxies the Gradle Maven plugin repo ( https://plugins.gradle.org/m2/ ).
I’m unable to resolve plugins when I try to run my build. Can you help me correct my settings file so that I can get this build operational?
I’ve created a settings.gradle file with the following content:
pluginRepositories {
maven {
url 'http://artifactory.bigco.com:8081/artifactory/virtual-gradle/gradle/plugin/'
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
The first strange thing is that my IDE (IntelliJ) gives me a warning: ‘credentials’ cannot be applied to GString? That seems to suggest that I’m not allowed to have a credentials block inside a maven block in settings.gradle.
If I look at the URL that I’ve used for this repo, it contains two directories: “org” and “com”.
When I run the build I get the following error:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\workspace\fooproject\build.gradle' line: 26
* What went wrong:
Plugin [id: 'org.jenkins-ci.jpi', version: '0.16.0'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- maven(http://artifactory.bigco.com:8081/artifactory/virtual-gradle/gradle/plugin/) (Could not resolve plugin artifact 'org.jenkins-ci.jpi:org.jenkins-ci.jpi.gradle.plugin:0.16.0')