<dependency>
<groupId>com.example</groupId>
<artifactId>abc</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/abc-1.0.jar</systemPath>
</dependency>
打包abc时需要注意把包下载放到项目根录的lib包下
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- 打包时会将本地jar一起打包 -->
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>