Is there a way to use %UserProfile% when specifying paths in a Eclispe .classfile
? I have a project that contains the following line in its .classfile
:
<classpathentry kind="lib" path="C:/Users/<username>/.ivy2/cache/somelib.jar"/>
Is there a way to specify this in a more portable way that can be checked into a repository and used by different users? In particular I'd like to get rid of the C:/Users/<username>
part of the path.
I see two possible ways to solve the problem, but don't know how to implement either of them:
- Use %UserProfile% in the path to refer to the users directory. On Linux, one could use
~
, but this does not seem to work on Windows. - Use an environment variable that specifies the location of the ivy cache.
Any hints how to do either of these things, or how to solve the problem in an other way would be appreciated.
Background: The project is a Scala project that is built using sbt, which manages dependencies with ivy.