Question

I have a <filesystem> resolver in my ivysettings.xml, along with the central M2 repository, and it all works OK. However, I was wondering whether there is a way to bypass the cache entirely for the dependencies found with the filesystem resolver. I don't need to have them so many times around on my filesystem (once in the directory searched by the resolver, once in the cache, and once in each project's lib folder…).

Was it helpful?

Solution

Found it. The name of a cache with the useOrigin="true" attribute can be specified on the resolver:

<ivysettings>
  <settings defaultResolver="main"/>
  <caches>
    <cache name="main" basedir="${ivy.settings.dir}/ivycache" />
    <cache name="nocache" useOrigin="true" />
  </caches>
  <resolvers>
    <chain name="main">
      <filesystem name="filesystem" cache="nocache">
        <artifact pattern="${ivy.settings.dir}/ivyrep/[artifact].[ext]" />
      </filesystem>
      <ibiblio name="ibiblio" m2compatible="true" usepoms="false" />
    </chain>
  </resolvers>
</ivysettings>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top