简体   繁体   中英

Apache Ivy: Difference between local Ivy cache and local repository

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM