How to change the location of the dependency cache? ( or change .classpath files)


(Michael Hoff) #1

Hello, I just wanted to ask if you can change the location of the dependency cache in gradle. I have an eclipse project and wanted to include several Jars, which are downloaded by gradle and copied into a “lib/dependencies” folder.

When gradle triggers the eclipse task however, it overwrites the .classpath with the path of the Jars in the cache so that the Manifest file cannot find the jars in the local folder anymore.

Is there an easy way to tell gradle that I don’t want to include the jars from the cache but from the separately downloaded jars from the “lib/dependencies” folders into the .classpath?

Thanks in advance!


#2

You can customise the files generated by the ‘eclipse’ task as documented here: http://gradle.org/docs/current/userguide/userguide_single.html#N135B3

But is there a good reason that you need to use these particular jar files, and not the ones in the cache? How are they included as dependencies in your build?


(Michael Hoff) #3

Thanks!

They are referenced libraries and this works so far. The problem is that this is an project which is under development for some time, and the jar libraries have been stored in the lib folder in each project and are referenced in the Manifest file. But when gradle changes the class path file the manifest file cannot find these libraries anymore.

So basically we just got errors in the Manifest file because of the modified classpath.

The idea was just to have a build script for RCP application building (this works very well) which has a flawless eclipse integration (which does’t work so well at the moment)