对于一些内部项目的jar,有时候不会放到maven库上去,那么idea中maven项目引入的第三方jar包,如何打入到要发布的包里面呢?两步,
1、pom中对关联项的依赖
注意 scope 设置为 system,systemPath 可设置第三方jar本地路径。
2、打包插件的配置
原springboot打包插件加了一个Configuration,
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</build>