Maven Install Plugin

The Local Repository is the local cache where all artifacts needed for the build are stored. By default, it is located within the user's home directory (~/.m2/repository) but the location can be configured in ~/.m2/settings.xml using the <localRepository> element.

The install plugin is used during the install phase to add artifact(s) to the local repository. The install plugin uses the information in the POM (groupId, artifactId, version) to determine the proper location for the artifact within the local repository.

Goals Overview

The install plugin has 2 goals:

  • install:install is used to automatically install the main project artifact (the jar, war or ear), its pom and any attached artifacts (sources, javadoc, etc) produced by a particular project.
  • install:install-file is mostly used to install an externally created artifact into the local repository, along with its pom. In that case the project information can be taken from an optionally specified pomFile, but can be given using command line parameters.

Usage

Some basic instructions for configuring and using the mojos of the maven-install-plugin can be found in the Usage.

Examples

To provide you with better understanding on some usages of the Maven Install Plugin, you can take a look into the following examples: