I am trying to use artifactory in gradle.
this is my build.gradle (which was generated from the UI in the artifactory website) :
buildscript {
repositories {
maven {
url 'http://avra_artifactory:8081/artifactory/plugins-release'
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.9')
}
}
allprojects {
apply plugin: 'artifactory'
}
artifactory {
contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
repoKey = 'libs-release-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
resolve {
repository {
repoKey = 'libs-release'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
but i for some reason get this error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'GradleConfiguration'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve org.jfrog.buildinfo:build-info-extractor-gradle:2.0.9.
Required by:
:GradleConfiguration:unspecified
> Target host must not be null, or set in parameters.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
GradleConfiguration is the name of the project which the build.gradle resides.
Can someone explain why i get this error?