Artifactory 正在缓存我不想要的工件

Artifactory is caching artifacts that I didn't intend

我不太确定 Artifactory 是如何工作的,但它似乎缓存了我在 Android 项目中使用的 15 个不同库中的 1 个。更具体地说,它似乎在缓存番石榴。稍后,我想设置缓存,以便我所有的机器都可以从我的 Artifactory 服务器中提取(而不是下载相同的 lib/repo 5 次),但现在我想完全禁用此功能。有什么方法可以在设置中将其关闭吗?

我只想让 Artifactory 为我的本地工件提供服务,但它似乎也在尝试为 jcenter 工件提供服务。

Artifactory 将缓存从远程存储库请求的工件。 Artifactory 中的 remote repository 用作远程工件的缓存代理(jcenter 是此类存储库的一个示例)。
当您的构建正在解析来自 Artifactory 的工件时,它可能正在解析来自远程存储库的工件。如果您直接从构建中引用远程存储库,或者如果您引用聚合远程存储库(例如内置的 remote-repos 存储库)的 virtual repositories,则可以间接执行此操作。
有多个选项可以实现您请求的行为:

  1. 停止从您的构建脚本中引用远程存储库(直接通过虚拟间接引用)
  2. 将 Artifactory 中的远程存储库配置为 offline mode - Artifactory does not try to fetch remote artifacts. Only locally-cached artifacts are retrieved. This can also be configured globally 所有远程存储库。
  3. 将 Artifactory 中的远程存储库配置为 not store artifacts locally - 工件是笔记缓存,使用直接存储库到客户端流。这意味着远程工件在每次请求时仍将被解析,但不会缓存在 Artifactory 中。