方法一
把jar包推到maven服务器
方法二
在pom.xml
添加本地源目录
...
<repositories>
<repository>
<id>local</id>
<name>local</name>
<url>file://${project.basedir}/libs</url>
</repository>
</repositories>
...
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</dependency>
然后在项目下新建一个libs
的目录
然后把jar包放在libs/${groupId}/${artifactId}/${version}/${artifactId}-${version}.jar
就好了