sbt-eclipse icon indicating copy to clipboard operation
sbt-eclipse copied to clipboard

Allow option to generate .classpath paths relative to user.home, rather than absolute

Open benhutchison opened this issue 12 years ago • 3 comments

Currently, sbteclipse generates absolute pathnames into the ivy repository. This is the main reason why my .classpath files are not portable across machines. I would like a way to generate paths relative to my user.home location, since the default ivy2 repo is relative to that.

sbt-idea currently does this, eg:

root url="jar://$USER_HOME$/.ivy2/cache/junit/junit/jars/junit-4.7.jar!/"

Some evidence that this is an issue for other people also: http://stackoverflow.com/questions/12983203/use-userprofile-in-eclipse-classpath-windows http://stackoverflow.com/questions/14663211/change-name-and-or-path-of-classpath-file-in-eclipse?rq=1

benhutchison avatar Jun 08 '13 11:06 benhutchison

I would suggest that similarly to what is done with Maven and its M2_REPO variable, a variable be used such as IVY_CACHE. That way we could have classpath entries independent from the platform and user, eg:

Alain-Bearez avatar Dec 17 '13 13:12 Alain-Bearez

Any updates on this issue? It would be nice to have portable .classpath files.

afroozeh avatar Dec 19 '15 00:12 afroozeh

I just faced this issue too.

It would be nice to have portable .classpath.

Currently, to deal with it, I need to re-run sbteclipse on the project on each machine, and also ignore .classpath and project settings files in the version control system -- so that they don't constantly conflict.

ddemange avatar Sep 06 '17 09:09 ddemange