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.
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> <groupId>com.packt</groupId> <artifactId>jose</artifactId> <version>1.0.0</version> <distributionManagement> <repository> <id>local-file-repository...