简体   繁体   English

Apache Ivy:本地Ivy缓存和本地存储库之间的区别

[英]Apache Ivy: Difference between local Ivy cache and local repository

By default Ivy installs a "local cache" under your <HOME>/.ivy2 directory. 默认情况下,Ivy在<HOME>/.ivy2目录下安装“本地缓存”。 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? 但是,如果我决定在同一台机器上“托管”本地存储库,比如在<HOME>/workbench/ivy/ ,那么这两个概念有何不同? 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 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) 有一个常春藤cleancache旨在清除常春藤缓存任务(这是推荐的东西,定期,以迎合行为不端库)
  • In Maven-land the "local" repository is also used as a cache..... ivy has a cleaner separation of purpose. 在Maven-land中,“本地”存储库也用作缓存......常春藤具有更清晰的目的分离。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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