maven添加本地jar包依赖
2022-03-07 本文已影响0人
DD_Dog
在使用springboot开发中,有时会在本地添加一些jar包依赖,添加完成后可以正常运行,但是在使用maven编译或者打包会出现这些本地依赖找不到问题,这时需要将本地依赖添加到maven配置中。
例如我在/src/main/libs/添加了commons-codes-1.9.jar,如图:

maven配置如下:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>codec</artifactId>
<version>1.10</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/libs/commons-codec-1.9.jar</systemPath>
</dependency>