Maven - Distribution Management

Card Puncher Data Processing

About

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

This data are used in the deploy phase

Example

Three steps are needed:

  • give the repository location
  • set the credentials
  • deploy

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>

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)

Deploy

Maven - (Deploy|Distribution) Phase

mvn clean deploy

Documentation / Reference





Discover More
Card Puncher Data Processing
Maven

is a build tool. It is declarative build tool whereas ant is a procedural build tool. You can then change the build process by changing the process not the declaration. Most of the project declaration...
Card Puncher Data Processing
Maven - (Deploy|Distribution) Phase

This deploy phase copies: a (final) package a web site or the Javadoc documentation to a remote repository for sharing with other developers and projects. In most project builds, the deploy phase...



Share this page:
Follow us:
Task Runner