maven 引用本地jar

1.添加lib文件夹在src文件夹中。
2.拷贝所需要的test.jar包到lib文件夹。
3.在pom文件加入如下依赖

<!--添加本地私有包-->
<dependency>
<groupId>gnete-bc-139</groupId>
<artifactId>gnete-bc-139</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${basedir}srcmainwebappWEB-INFlibgnete-bc-139.jar</systemPath>
</dependency>
<dependency>
<groupId>gnete-security-1.1</groupId>
<artifactId>gnete-security-1.1</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${basedir}srcmainwebappWEB-INFlibgnete-security-1.1.jar</systemPath>
</dependency>
<!--添加本地私有包-->
原文地址:https://www.cnblogs.com/caozengling/p/8397699.html