About
The distribution Management pom.xml section is responsible to define:
- how to deploy the project's site and documentation.
This data are used in the deploy phase
Articles Related
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