【发布时间】:2012-10-21 06:17:27
【问题描述】:
我正在开发一个开源库,并希望将版本发送到内部工件服务器。我一直在使用 maven 的 distributionManagement 并覆盖 altDeploymentRepository 指向内部服务器(所以它永远不会在 pom 中)。当我使用deploy:deploy 时,这工作正常,但是当我使用 maven 发布插件时,这似乎被忽略了。
mvn clean -DaltDeploymentRepository=central::default::internalhost deploy ## works
mvn clean -DaltDeploymentRepository=central::default::internalhost release:perform ## fails, doesn't pick up this setting
发布插件运行部署时如何通过命令行覆盖存储库?
【问题讨论】:
-
不能编辑POM重新定义分发管理信息吗?
-
试试这个
mvn release:perform -Darguments=-DaltDeploymentRepository=myvalue。 -
感谢@yorkw,效果很好!
-
@yorkw 您应该将此作为完整答案发布,因为它是正确的。
-
central::default::internalhost是什么意思?它不应该像一些网址吗?