Deploying artifacts

To deploy artifacts into a Maven repository, we need to define a distributionManagement configuration element in the application POM file of the root Maven module. At the time of writing this book, Maven supports SSH, SFTP, FTP, and file-based artifact deployment. Let's have a look at how file-based artifact deployment works.

Deploying file-based artifacts

The following configuration will deploy the artifacts to the repository at /Users/prabath/maven/deploy. This is one of the easiest and the quickest way of building a Maven repository, but this is not recommended for use in a large-scale development project. Use the mvn deploy command to deploy the artifacts into the configured repository.

<project> <modelVersion>4.0.0</modelVersion> ...

Get Mastering Apache Maven 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.