Is it possible to turn off ivy's cache altogether?
Asked Answered
K

1

1

I'm talking about ivy 2, not some newer version.

Keefe answered 18/6, 2012 at 7:47 Comment(2)
Is there a reason why? Perhaps you're interested in controlling it's location. Seem similar question: #5020050Sadducee
I know how to control its location. My problem is that sometimes I get an "impossible to publish artifacts..." error when I use ant to build my projects and this is because ivy's cache becomes invalid somehow. If I clean the cache the build runs flawlessly.Keefe
P
3

Switching off the cache affects performance. Switching it off loses one of the big benefits of dependency management, because you'd force each build to download everything....

Having said that, over time the cache sometimes become stale, especially in situations where the remote modules might have changing dependencies (Can occur during development). To counter this problem I always include an extra build target that purges my ivy cache:

<target name="clean-all" depends="clean">
    <ivy:cleancache />
</target>

This gives you the best of both worlds. Disabling the cache is accomplished by first running a purge as follows:

ant clean-all build
Post answered 18/6, 2012 at 20:59 Comment(1)
is there any way to specify this in the `ivysettings.xml'? I am using spark and ivy cache is caching too much stuff increasing disk size. I am trying to avoid that by turning it offWithdrawal

© 2022 - 2024 — McMap. All rights reserved.