简体   繁体   中英

How to set deployment repository in pom.xml

everybody! When I deploy my artefact, I run

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

What should I put into pom.xml to be able to run this command from Idea without creating custom command on every maschine?

From: 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>

Here you can find description of parameters you pass: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html

Authentication you should store in your settings.xml file:

<server>
  <id>internal.repo</id>
  <username>maven</username>
  <password>foobar</password>
</server>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM