我认为这应该是可能的,但我没有找到任何与之相关的东西,因为我发现的所有东西都与依赖存储库有关。
我想做的是定义 maven(例如部署或发布插件)推送 Artifact 的存储库。如何在命令行上定义它?我假设它是 -Dsomething
更新:当我仔细阅读 Jenkins 错误输出时,它提示使用:-DaltDeploymentRepository=id::layout::url
使用它的格式是什么?什么是布局参数?
最佳答案
最简单的就是阅读documentation about the maven-deploy-plugin其中描述了格式:
mvn -DaltDeploymentRepository=repositoryId::default::http://WhatEverURL
在 distributionManagement 中,您通常会给出以下内容:
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>MyCo Internal Repository</name>
<url>Host to Company Repository</url>
</repository>
</distributionManagement>
如果您想在这种情况下使用不同的 URL,您需要提供:
mvn -DaltDeploymentRepository=internal.repo::default::http://WhatEverURL
在这种情况下,默认值是 maven repository layout 的默认值。 .
关于maven - 在命令行上添加一个 maven(发行版)存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12435283/