引入本地jar
<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>
${project.basedir}表示项目所在根目录
打包成jar
给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>
打包命令:mvn clean package