【问题标题】:How to set deployment repository in pom.xml如何在 pom.xml 中设置部署存储库
【发布时间】:2018-11-01 08:58:30
【问题描述】:

大家! 当我部署我的人工制品时,我会运行

clean deploy -DaltDeploymentRepository=releases::default::http://nexus.******.com/nexus/content/repositories/releases

我应该在 pom.xml 中添加什么以便能够从 Idea 运行此命令,而无需在每个机器上创建自定义命令?

【问题讨论】:

  • 您应该正确配置distributionManagement。之后你可以简单地做mvn clean deploy...

标签: java maven deployment pom.xml


【解决方案1】:

发件人: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>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-17
    • 1970-01-01
    • 1970-01-01
    • 2023-03-17
    • 2014-10-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多