SpringBoot maven项目 如何将lib目录下的 jar 文件一并打入到项目jar包中 ?
情景POM.xmldependencies 添加build 添加情景
在一些特殊的情况下,需要导入本地的jar包到项目中,这时候需要做一些设置才能在打包的过程中不会出现找不到jar包的问题。
POM.xml
dependencies 添加
<dependencies><!--引入本地jar包地址--><dependency><groupId>xxx.xxxx</groupId><artifactId>xxxxx</artifactId><version>1.0</version><scope>system</scope><systemPath>${project.basedir}/xxx/****/xxxx.jar</systemPath></dependency></dependencies>
build 添加
<includeSystemScope>true</includeSystemScope>
<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><includeSystemScope>true</includeSystemScope></configuration></plugin></build>