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.