I. Usage scenarios
1. If you want to configure use in the Maven pom file, you must add the jar package to the MAVEN repository in accordance with the MAVEN specification, and then you can configure the reference in the Pom.
Two. Preparatory work
1. The computer is already installed MAVEN, the local warehouse is configured.
2.jar package path, e.g. D:jar/junit-4.11.jar
Three. Operation procedure
1. Open the Computer cmd command window
2.cd to D:jar, of course, you can not use the CD to the path of the jar package, This is just for the back of the path of less jar package
3. Enter the command:
MVN Install:install-file-dfile=junit-4.11.jar-dgroupid=junit-dartifactid=junit-dversion=4.11-dpackaging=jar
4. See Bulld SUCCESS Description Success
Four. Inspection
Introducing dependencies into the POM in a MAVEN project
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
Jar entered successfully, indicating OK
maven-Adding a local jar package to the local warehouse