In our environment, we end up with multiple workspaces (runk plus multiple branches).
We wish to separate our resolution caches, but share the actual cache.
So far, this is easy, but it requires hand-coding an identifier for the local resolution cache name (e.g., in ivysettings.local.xml), and obviously that's suboptimal, and has to be set up by hand for each branch (or workspace if we ever have more than one workspace per branch).
What we'd like to do is to make use of the workspace name (as though Eclipse provided a ${workspace_name}
variable), but that doesn't appear to be the case. I don't find anything like that in the list of available variables, and we don't see anything holding the workspace name when running ivy in the debugger.
I've looked at both of these questions, but neither seems to address this issue:
Turns out to be easier than we thought, but I figure it might help someone else. Instead of telling ivy by name what the resolution cache name is, we're using a relative path. This from our ivysettings.local.xml (included in a project in each workspace) shows what I mean:
Combining this:
<property name="ivy.local.resolution.cache"
value="${ivy.settings.dir}/../../.ivy/resolution-cache"/>
with this:
<caches default="local-cache"
defaultCacheDir="${ivy.local.cache}"
resolutionCacheDir="${ivy.local.resolution.cache}">
<cache name="local-cache"/>
</caches>
gets us most of the way there: we have a shared local-cache, and per-workspace resolution caches.
But it leaves us with another challenge: we still want to set the changingPattern
regexp. For that, it would be very helpful to be able to pick up the workspace name from eclipse.
Suggestions would be highly appreciated.