Maven - Distribution Management

1 - About

The distribution Management pom.xml section is responsible to define:

This data are used in the deploy phase

3 - Example

Three steps are needed:

  • give the repository location
  • set the credentials
  • deploy

3.1 - Remote Repository Location

with Repository Manager - Nexus, in the pom.xml, we set the repository locations

<distributionManagement>
    <repository>
      <id>nexus</id>
      <name>Releases</name>
      <url>http://localhost:8081/repository/maven-releases</url>
    </repository>
    <snapshotRepository>
      <id>nexus</id>
      <name>Snapshot</name>
      <url>http://localhost:8081/repository/maven-snapshots</url>
    </snapshotRepository>
</distributionManagement>

3.2 - Credentials

and in settings.xml the credentials

<settings>
...
  <servers>
    <server>
      <id>nexus</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
  </servers>
...
</settings>

See also: Maven - (Password|Credentials)

3.3 - Deploy

4 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap