大家好! 当我部署我的 Artifact 时,我运行
clean deploy -DaltDeploymentRepository=releases::default::http://nexus.******.com/nexus/content/repositories/releases
我应该在 pom.xml 中添加什么内容,以便能够从 Idea 运行此命令,而无需在每台机器上创建自定义命令?
最佳答案
来自:https://maven.apache.org/plugins/maven-deploy-plugin/usage.html
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>MyCo Internal Repository</name>
<url>Host to Company Repository</url>
</repository>
</distributionManagement>
在这里您可以找到您传递的参数的说明: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html
您应该将身份验证存储在 settings.xml 文件中:
<server>
<id>internal.repo</id>
<username>maven</username>
<password>foobar</password>
</server>
关于java - 如何在pom.xml中设置部署存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53097965/