Artifactory provides a Jenkins plugin and according to the docs it is supposed to
resolve artifacts from Artifactory and deploy artifacts and build information to Artifactory.
I published a library to Artifactory and now I'm trying to build a project that consumes that library
My Setup
build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
}
}
Jenkins gradle build-step
Runs ./gradlew assemble
Gradle-Artifactory Integration:
Enabled, but since I only need/want artifacts to be resolved from Artifactory, I've configured my Artifactory server and resolution repository, but disabled everything else.
My build currently fails with the following error
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find any version that matches com.mygroup:mylib:latest.integration.
Searched in the following locations:
file:/var/lib/jenkins/.m2/repository/com/mygroup/mylib/maven-metadata.xml
file:/var/lib/jenkins/.m2/repository/com/mygroup/mylib/
https://jcenter.bintray.com/com/mygroup/mylib/maven-metadata.xml
https://jcenter.bintray.com/com/mygroup/mylib/
file:/mnt/jenkins/tools/android-sdk/extras/android/m2repository/com/mygroup/mylib/maven-metadata.xml
file:/mnt/jenkins/tools/android-sdk/extras/android/m2repository/com/mygroup/mylib/
file:/mnt/jenkins/tools/android-sdk/extras/google/m2repository/com/mygroup/mylib/maven-metadata.xml
file:/mnt/jenkins/tools/android-sdk/extras/google/m2repository/com/mygroup/mylib/
Required by:
My Job:app:1.0-SNAPSHOT
Clearly, gradle is not searching Artifactory for the artifact.
Question
How can I get the Artifactory plugin for Jenkins to tell gradle to resolve artifacts from my Artifactory server? Even just getting gradle to look there would be a start.