引入本地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
