Book Image

Mastering Apache Maven 3

Book Image

Mastering Apache Maven 3

Overview of this book

Table of Contents (16 chapters)
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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>
  <groupId>com.packt</groupId>
  <artifactId>jose</artifactId>
  <version>1.0.0</version>

  <distributionManagement>
    <repository>
      <id>local-file-repository...