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

标签 maven artifactory release-management

神器网站列出了 6 种类型的 repo,并声称此命名模式是最佳实践:

我有两个问题,

  1. 应该在 plugins-* 存储库中存储什么。请举一个具体的例子。我不明白为什么插件应该有一个单独的仓库。
  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> 对于依赖项和 <pluginRepositories> 对于插件。

插件存储库用于声明对插件的依赖性。例如, maven-compiler-plugin 由 Maven 正确解析,因为 <pluginRepository>Super POM 中定义(实际上指向 Maven Central)。如果您要开发公司内部的 Maven 插件,最好将其存储在 plugins-* 中。 repo 。

关于这个“最佳实践”没有任何官方页面(至少我能找到),但请注意 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.

关于maven - 什么应该存储在 "plugins-release-local"和 "plugins-snapshot-local"存储库中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34845201/

相关文章:

java - Gradle Eclipse 依赖项

release - Octopus 部署和多个分支/发布候选

SVN : Documentation also on a branch?

java - IntelliJ 说依赖项列表中的项目无效,但它存在于 Maven 存储库中

Java-Eclipse 与 Spark 的依赖错误

java - Maven - 不要在最终的 WAR 中包含 src/main/webapp 的某个子目录

Artifactory 在启动过程中无法从/api/v1/system/ping 获得响应

artifactory - jfrog Artifactory 无法验证路由器错误

scala - SBT 可以发布到 JFrog Artifactory 吗

安卓私有(private)发布