How to add dependencies from Artifactory to my Gradle project?

Hello, I am dealing with Gradle project and Artifactory. I’m trying to add some dependencies to my gradle project by adding :

repositories {
maven {
url 'http://localhost:8081/artifactory/libs-release-local/com/fasterxml/jackson/core/jackson-annotations/'
credentials {
username = "${artifactory_user}"
password = “${artifactory_password}”
}}

}

dependencies {
compile group: ‘com/fasterxml/jackson/core’, name: ‘jackson-annotations’, version: ‘2.6.3’, ext: ‘pom’
}

However, there is no jar added to my project.

I think the used URL is invalid; it should only be

even if I use this URL: ‘http://localhost:8081/artifactory/libs-release-local’ , no jar is added to my project.

on command line, do you see any download failures?

this works for us:

we defined url and credentials in ‘gradle.properties’ and have this in ‘build.gradle’:

repositories {
      maven {
         url artifactoryUrl
            credentials {
                username artifactoryUser
                password artifactoryPassword
            }
     }
   }

Thanks @carlo_lf for your help,
it’s true, there is no download failures, I checked ‘.gradle\caches\modules-2\files-2.1’ and I found all the downloaded jar, Since I’m a new be with gradle didn’t know about the gradle cache …
But I still don’t understand why the downloaded jar are not visible in my eclipse project under ‘Project and External Dependecies’

Do have Buildship as Eclipse plugin? Then select the project and do ‘Gradle refresh project’. This will add the jar(s) to the Eclipse classpath.

Actually, I’m working with Eclipse Oxygen, but I don’t have Eclipse Buildship plugin… I will try to add it and see the result.

yes, you should if your projects are Gradle and Eclipse projects.