cleancache

[since 2.0]

Cleans the Ivy cache.

This task is roughly equivalent to:

<delete dir="${ivy.cache.dir}"/>

Using the regular Ant delete task is more flexible, since it allows to specify the files to delete. But it requires Ivy settings to be loaded, and settings scoping is possible only by using a suffixed Ant property for the cache directory.

This task loads the Ivy settings as any other post settings task, and allows easy scoping with the attribute settingsRef.

Attributes

Attribute Description Required

settingsRef

A reference to Ivy settings that must be used by this task

No. Defaults to ivy.instance.

Examples

<ivy:cleancache/>

Cleans the cache directory as defined in the loaded settings (by default ~/.ivy2/cache)

<ivy:cleancache settingsRef="mysettings"/>

Cleans the cache directory as defined in the loaded settings identified as mysettings