How to force to download dependencies into local maven reposity?

Dear,

I have a dependencies with joda-time-2.7 which is used too by gradle. As gradle found this jar into his cache it won’t to download it into local .m2 repository.

I had this task into the build.gradle to show it:

task showTestTaskClasspath << {
  test.classpath.each { println it }
}
$ gradle showTestTaskClasspath
:showTestTaskClasspath
$HOME/BROOLS/build/classes/test
$HOME/BROOLS/build/resources/test
$HOME/BROOLS/build/classes/main
$HOME/BROOLS/build/resources/main
$HOME/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.7/5599707a3eaad13e889f691b3af78c8c03842195/joda-time-2.7.jar
$HOME/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.2/b316e9737eea25e9ddd6d88eaeee76878045c6b2/logback-classic-1.1.2.jar
$HOME/.m2/repository/org/drools/drools-compiler/6.2.0.CR4/drools-compiler-6.2.0.CR4.jar
$HOME/.gradle/caches/modules-2/files-2.1/org.drools/default-kiesession/6.2.0.CR4/2fe19cdd44365e31389024e89e29c8aadb572732/default-kiesession-6.2.0.CR4.jar
$HOME/.m2/repository/junit/junit/4.11/junit-4.11.jar
$HOME/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.1.2/2d23694879c2c12f125dac5076bdfd5d771cc4cb/logback-core-1.1.2.jar
$HOME/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.6/562424e36df3d2327e8e9301a76027fca17d54ea/slf4j-api-1.7.6.jar
$HOME/.m2/repository/org/drools/drools-core/6.2.0.CR4/drools-core-6.2.0.CR4.jar
$HOME/.m2/repository/org/kie/kie-api/6.2.0.CR4/kie-api-6.2.0.CR4.jar
$HOME/.m2/repository/org/kie/kie-internal/6.2.0.CR4/kie-internal-6.2.0.CR4.jar
$HOME/.m2/repository/org/antlr/antlr-runtime/3.5/antlr-runtime-3.5.jar
$HOME/.m2/repository/org/eclipse/jdt/core/compiler/ecj/4.3.1/ecj-4.3.1.jar
$HOME/.m2/repository/org/mvel/mvel2/2.2.2.Final/mvel2-2.2.2.Final.jar
$HOME/.m2/repository/com/thoughtworks/xstream/xstream/1.4.7/xstream-1.4.7.jar
$HOME/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
$HOME/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
$HOME/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
$HOME/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
  BUILD SUCCESSFUL

As you can see joda-time is into $HOME/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.7/5599707a3eaad13e889f691b3af78c8c03842195/joda-time-2.7.jar

I would like to get it into my local repository to be seen by my IDE

Thanks

You can generate project settings for your ide using gradle that will incude location of the artifacts. Have a look at IDEA pluing and Eclipse plugin.

In addition, I believe gradle will only store remote dependencies in the .gradle cache location. I don’t think there is anyway to have it write to the .m2 cache unless you are publishing an artifact.

thanks I used: gradle idea