Introduction:
One big problem with Maven is the introduction of third-party packages, which are not available in the MAVEN main repository, such as the Springside-core-3.2.3.jar package.
Installing a third-party jar to the local MAVEN repository
Use the following command:
MVN Install:install-file-dgroupid=org.springside-dartifactid=springside-core-dversion=3.2.3-dpackaging=jar- Dfile=springside-core-3.2.3.jar
The effect after operation is as follows:
This jar package can be used by Maven for normal use.
Third-party jar associated to the project
1. Dump the installation directory of the third-party jar in the local MAVEN library to the project Lib folder
Copy a parent project (package type POM) in the folder Lib that installs the local jar package according to the path of the Maven repository intact. See details:
2. Add a reference path to the local repository in the Pom file
This local repository is essentially the same as the remote MAVEN Master Repository, and Maven automatically finds the third-party jar library from the project's Lib folder and installs it to the local Maven repository by setting the local path so that other people download the project and use MAVEN to build the project. This package can then be referenced and used normally. Detailed configuration is as follows:
Where the URL refers to the file://local file path protocol, and the remote warehouse path primarily uses the HTTP protocol. {Basedir} is the directory where the project's Pom file resides. The basic original is based on the path in the URL plus your groupid,artifactid, and version stitching into the final path to find files.
Reference: http://blog.csdn.net/czp11210/article/details/24376169
MAVEN's third-party jar package management