1、第一种
<dependency>
<groupId>xxx.xxx</groupId>
<artifactId>xxx</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/lib/xxx.jar</systemPath>
</dependency>
2、第二种
mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar
jar包默认安装在${user.home}/.m2/repository
然后pom直接添加
<dependency>
<groupId>xxx.xxx</groupId>
<artifactId>xxx</artifactId>
<version>1.0</version>
</dependency>