什么应该存储在 "plugins-release-local" 和 "plugins-snapshot-local" 存储库中

What should be stored in "plugins-release-local" and "plugins-snapshot-local" repository

人工制品网站列出了 6 种类型的回购协议,并声称此命名模式是最佳实践:

我有 2 个问题,

  1. plugins-* repos 中应该存储什么。请举一个具体的例子。我不明白为什么插件应该有一个单独的仓库。
  2. 这个最佳实践记录在哪里?

https://www.jfrog.com/confluence/display/RTF/Local+Repositories

libs-release-local = Your code releases
libs-snapshot-local= Your code snapshots
ext-release-local = Manually deployed 3rd party libs (releases)
ext-snapshot-local = Manually deployed 3rd party libs (shapshots)
plugins-release-local = Your and 3rd party plugins (releases)
plugins-snapshot-local =  Your and 3rd party plugins (snapshots)

Artifactory 做出这种区分只是因为 Maven 做出了区分。这是为了和Maven保持一致。

在 Maven 中,依赖项的存储库和插件的存储库在 2 个不同的标记中声明:即插件的 <repositories> for dependencies and <pluginRepositories>

插件存储库用于声明对插件的依赖性。例如,maven-compiler-plugin is correctly resolved by Maven because a <pluginRepository> is defined in the Super POM(实际上指向 Maven Central)。如果您要开发公司内部的 Maven 插件,最好将其存储在 plugins-* 存储库中。

没有关于此 "best practice" 的任何官方页面(我至少可以找到),但请注意 quoting the Maven docs(强调我的):

Repositories are home to two major types of artifacts. The first are artifacts that are used as dependencies of other artifacts. These are the majority of plugins that reside within central. The other type of artifact is plugins. Maven plugins are themselves a special type of artifact. Because of this, plugin repositories may be separated from other repositories (although, I have yet to hear a convincing argument for doing so). In any case, the structure of the pluginRepositories element block is similar to the repositories element. The pluginRepository elements each specify a remote location of where Maven can find new plugins.