This problem was already in discussion 2 years ago (http://forums.gradle.org/gradle/topics/removing_absolute_paths_from_eclipse_classpath_file), but did not end with a solution to the problem with absolute pathes of classpath entries of used libraries.
The problem manifests when you want to shield team users from underlying gradle build scripts. They shold just work with Eclipse projects the usual way - using generated Eclipse classpath and project files, checked in into SCM. When this scenario is wanted, you cannot have absolute path names in “.classpath” files if you don’t want your team users to have all the same absolute path for the projects.
So my idea was to have the Gradle cache relative to the root (or some other) project and have only relative pathes in “.classpath” files. This is possible when you hook into eclipse generation “whenMerged”. Here we can replace the entry path on nodes with kind “lib” with a relative name. But: the same thing is not possible by API when you want to replace the value of attribute “sourcepath” (the path to downloaded source jars) ; this value is only readable, not writeable.
Is there any solution? Or do we have to write a task with takes the generated “.classpath” files and do the replacement the workaround way?