问题
By default Ivy installs a "local cache" under your <HOME>/.ivy2
directory. But if I decide to "host" a local repository on the same machine, say, at <HOME>/workbench/ivy/
, then how are these two concepts different? Isn't a cache the same thing as an artifact repository?
回答1:
The concepts page describes the function of the ivy cache and the kinds of file it contains:
http://ant.apache.org/ivy/history/latest-milestone/concept.html
In a nutshell, the ivy cache is designed to improve performance, it's not meant to be the definitive copy of the files a build depends on. One never publishes to the cache. This is what an ivy repository is used for.
Additonal notes:
- There is an ivy cleancache task designed to purge ivy's cache (Something which is recommended, periodically, to cater for misbehaving repositories)
- In Maven-land the "local" repository is also used as a cache..... ivy has a cleaner separation of purpose.
来源:https://stackoverflow.com/questions/9366281/apache-ivy-difference-between-local-ivy-cache-and-local-repository