Guide to installing 3rd party JARs
from http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
![](https://i-blog.csdnimg.cn/blog_migrate/aa275807bcab6d823b647cea2889304f.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/05ac63f463130bd1876c1af927ae88a3.gif)
Often times you will have 3rd party JARs that you need to put in your local repository for use in your builds. The JARs must be placed in the local repository in the correct place in order for it to be correctly picked up by Maven. To make this easier, and less error prone, we have provide a goal in the install plug-in which should make this relatively painless.
![](https://i-blog.csdnimg.cn/blog_migrate/05ac63f463130bd1876c1af927ae88a3.gif)
To install a JAR in the local repository use the following command:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
![](https://i-blog.csdnimg.cn/blog_migrate/05ac63f463130bd1876c1af927ae88a3.gif)
- artifactId
ArtifactId of the artifact to be installed. Retrieved from POM file if specified.
Deprecated. No reason given- classifier
Classifier type of the artifact to be installed. For example, 'sources' or 'javadoc'. Defaults to none which means this is the project's main jar.
Deprecated. No reason given- createChecksum (Default: false)
Flag Whether to create checksums(MD5, SHA1) or not.
Deprecated. No reason given- file
The file to be deployed
Deprecated. No reason given- generatePom (Default: false)
Install a POM for this artifact. Will generate a default POM if none is supplied with the pomFile argument.
Deprecated. No reason given- groupId
GroupId of the artifact to be installed. Retrieved from POM file if specified.
Deprecated. No reason given- localRepositoryId
The id for the localRepo Deprecated. No reason given
- localRepositoryPath
The path for a specific local repository directory. It will wrap into an ArtifactRepository with localRepoId as id and with default repositoryLayout
Deprecated. No reason given- packaging
Packaging type of the artifact to be installed. Retrieved from POM file if specified
Deprecated. No reason given- pomFile
Location of an existing POM file to be deployed alongside the main artifact, given by the ${file} parameter.
Deprecated. No reason given- repositoryLayout (Default: default)
The type of remote repository layout to deploy to. Try legacy for a Maven 1.x-style repository layout.
Deprecated. No reason given- version
Version of the artifact to be installed. Retrieved from POM file if specified
Deprecated. No reason given
![](https://i-blog.csdnimg.cn/blog_migrate/05ac63f463130bd1876c1af927ae88a3.gif)