Using IvyDE with different workspaces on different branches

I am having problems using IvyDE when I have different workspaces for different branches. I have enabled "Resolve dependencies in workspace". But every time I go to a different workspace, I have to remember to manually clear the caches. This is because IvyDE always uses the default cache to resolve dependencies in the workspace, so when switching between workspaces, the cache can be polluted by different versions.

It would seem impossible to work with two different workspaces at the same time.

I can't find a way to customize the location that IvyDE uses to cache project dependencies. It does not use the caches defined in the ivysettings.xml file

+2


a source to share


1 answer


I now have a configuration using the most recent version of IvyDE.

In my ivysettings.xml I have included the line

<properties file="./revision.properties" />

      

This sets the version.version property which is used by our build scripts without using.

Then I set the following property

<property name="ivy.build.cache" value="${ivy.default.ivy.user.dir}/cache/${revision.version}" override="false" />

      



The default cache used by ivyDE is then installed with the following config block

<caches defaultCacheDir="${ivy.build.cache}">
    <cache name="cache" basedir="${ivy.build.cache}" />
</caches>

      

Then for any resolvers this box must be explicitly set as:

<filesystem name="build" cache="cache" latest="latest-revision">

      

It won't help if you have multiple workspaces on the same branch. But that means you can work on different branches at the same time without any problem.

+2


a source







All Articles