有时候项目上没有maven仓库,又提供了一个jar包,会使用临时本地引入jar包的形式,例如
<dependency>
<groupId>com.erbao</groupId>
<artifactId>file</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/file.1.0.jar
</systemPath>
</dependency>
springboot默认打包方式是不会奖本地引入的包打入到jar包中,需要在maven的plugin配置中添加配置<includeSystemScope>true</includeSystemScope>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--设置为true,以便把本地的system的jar也包括进来-->
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>