springboot引入本地jar包,并且打包把本地jar打进去
原文链接:https://blog.csdn.net/weixin_44656112/article/details/123393066
引入本地jar(${project.basedir}表示项目所在根目录)
<dependency>
<groupId>com.aaa</groupId>
<artifactId>bbb</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/bbb-1.0.0.jar</systemPath>
</dependency>
1
2
3
4
5
6
7
打包成jar包含引入的本地jar包
打包命令:mvn clean packag
给spring-boot的打包插件设置一下includeSystemScope参数即可
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>