altDeploymentRepository和altReleaseDeploymentRepository之间的区别 [英] Difference between altDeploymentRepository and altReleaseDeploymentRepository

查看:1552
本文介绍了altDeploymentRepository和altReleaseDeploymentRepository之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 swagger 在我的项目中生成Web服务客户端。生成的代码生成一个可以用作Maven库的库。我已经成功将发布版本部署到我的私有sonatype-nexus。

I use swagger to generate web services clients on my project. The generated code produce a library that can be use as a Maven lib. I already successfully deploy release version into my private sonatype-nexus.

我想知道 altDeploymentRepository 之间有什么区别 altReleaseDeploymentRepository ?如何 mvn deploy 如果设置了两个参数,选择要使用哪个存储库?

I wonder what is the difference between altDeploymentRepository and altReleaseDeploymentRepository? How mvn deploy select which repository to use if the two parameters are set?

作为 apache-maven部署文档说:


altDeploymentRepository :指定替代方案应该部署项目工件的存储库(除了指定的工件)。
格式:id :: layout :: url

altDeploymentRepository: Specifies an alternative repository to which the project artifacts should be deployed ( other than those specified in ). Format: id::layout::url

altReleaseDeploymentRepository :项目具有最终版本时使用的备用存储库。

altReleaseDeploymentRepository: The alternative repository to use when the project has a final version.

altSnapshotDeploymentRepository :项目具有快照版本时使用的备用存储库。

altSnapshotDeploymentRepository: The alternative repository to use when the project has a snapshot version.

当项目有最终版本时,究竟是什么

What exactly does


when the project has a final version.

是什么意思?

推荐答案

altReleaseDeploymentRepository 是如果指定,则在项目具有发布(或最终)版本时始终使用它,即不是快照版本。当 altSnapshotDeploymentRepository ,在项目具有快照版本时始终使用它。 altDeploymentRepository 是默认的备用部署存储库。

When altReleaseDeploymentRepository is specified, it is always used when the project has a release (or "final") version, i.e. is not a snapshot version. When altSnapshotDeploymentRepository is specified, it is always used when the project has a snapshot version. altDeploymentRepository is a default alternate deployment repository when none of the above repository were specified or used.

所以换句话说,如果你有发行版本,然后:

So to put it another way, if you have a release version, then:

  • altReleaseDeploymentRepository will be used if specified;
  • otherwise altDeploymentRepository will be used if specified;
  • otherwise the release remote repository declared in the <distributionManagement><repository> POM element will be used if specified;
  • otherwise the plugin will error because it didn't find any remote repository to deploy to.

同样,如果你有快照版本,那么:

Similarly, if you have a snapshot version, then:

  • altSnapshotDeploymentRepository will be used if specified;
  • otherwise altDeploymentRepository will be used if specified;
  • otherwise the snapshot remote repository declared in the <distributionManagement><snapshotRepository> POM element will be used if specified;
  • otherwise the release remote repository declared in the <distributionManagement><repository> POM element will be used if specified;
  • otherwise the plugin will error because it didn't find any remote repository to deploy to.

这篇关于altDeploymentRepository和altReleaseDeploymentRepository之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆