# Fail to resolve dependencies using Artifactory in console

**URL:** <https://discuss.gradle.org/t/fail-to-resolve-dependencies-using-artifactory-in-console/1540>\
**Category:** Old Forum Archive\
**Created:** [July 24, 2014, 12:27pm UTC](https://discuss.gradle.org/t/fail-to-resolve-dependencies-using-artifactory-in-console/1540 "2014-07-24T12:27:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Firas\_Fafi](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@Firas\_Fafi](https://discuss.gradle.org/u/Firas_Fafi)\
**Post date:** [July 24, 2014, 12:27pm UTC](https://discuss.gradle.org/t/fail-to-resolve-dependencies-using-artifactory-in-console/1540/1 "2014-07-24T12:27:00Z")

</div>

Hello, I have weird situation here: First I have configured Artifactory by creating remote, local repositories and virtual repositories. Then I have added all setting to build in gradle as below:

```gradle
buildscript {
  repositories {
    maven {
      url 'http://staging04.labs.com:8080/artifactory/plugins-release'
      credentials {
        username = "admin"
        password = "AP8S4FpSYps4uNCHXjnBCzpnfBm"
        maven = true
      }
    }
  }
 dependencies {
        classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.12')
    }
}
      artifactory {
     //The base Artifactory URL if not overridden by the publisher/resolver
  contextUrl ='http://staging04.labs.com:8080/artifactory'
  publish {
    repository {
     repoKey = 'lib-release-local'
      username = "admin"
      password = "AP8S4FpSYps4uNCHXjnBCzpnfBm"
      maven = true
      }
  }
    resolve {
    repository {
      repoKey = 'FrontEnd-repo'
      username = "admin"
      password = "AP8S4FpSYps4uNCHXjnBCzpnfBm"
      maven = true
    }
 }
    }
  dependencies {
  gwt ComGoogleGwtGID+':gwt-servlet:'+gwtVersion
  gwt ComGoogleGwtGID+':gwt-dev:'+gwtVersion
  gwt ComGoogleGwtGID+':gwt-user:'+gwtVersion
  gwt ( group:'javax.validation', name:'validation-api', version:'1.1.0.Final', classifier:'sources' )
  gwt 'gwt-visualization:gwt-visualization:00'
  gwt 'gson:gson:2.1'
......
//many dependencies
 }

```

Well from Eclipse, I have succeeded in resolving dependencies from Artifactory but my problem that gradle doesn’t resolve these dependencies via command line using the the console. Even after cleaning the gradle caches and execute this command line:

```gradle
gradle --refresh-dependencies

```

Gradle download only the plugin relative dependencies and return a build successful without download the others dependencies.

Thank you!!

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [July 24, 2014, 1:11pm UTC](https://discuss.gradle.org/t/fail-to-resolve-dependencies-using-artifactory-in-console/1540/2 "2014-07-24T13:11:00Z")

</div>

Gradle downloads dependencies just-in-time when they are first used. Calling ‘gradle’ without any task only requires buildscript dependencies to be resolved.

---

<div class="post-metadata">

**Author:** ![Firas\_Fafi](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@Firas\_Fafi](https://discuss.gradle.org/u/Firas_Fafi)\
**Post date:** [July 24, 2014, 1:41pm UTC](https://discuss.gradle.org/t/fail-to-resolve-dependencies-using-artifactory-in-console/1540/3 "2014-07-24T13:41:00Z")

</div>

Thank you so much Peter. It works fine now!!
