mvn install:install-file -Dfile=/path/to/your/local/jarFiles/xxx.jar -DgroupId=groupName -DartifactId=artifactName
-Dversion=VersionNum
-Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true
Then you can file your local jar package in the repository.Your jar was in the
groupName/artifactName/VersionNum/artifactName-versionNum.jar
After this , you can use the package in the pom.xml like this:
<dependencies>
<dependency>
<groupId>groupName</groupId>
<artifactId>artifactName</artifactId>
<version>VersionNum</version>
</dependency>
</dependencies>