首页  

springboot依赖本地jar打包配置     所属分类 springboot 浏览量 996
scope  system
${basedir}
spring-boot-maven-plugin   includeSystemScope  true  很重要 !!!



<dependency>
	<groupId>localjar</groupId>
	<artifactId>localjar</artifactId>
	<version>1.0</version>
	<scope>system</scope>
	<systemPath>${basedir}/lib/localjar-1.0.jar</systemPath>
</dependency>

includeSystemScope 配置为 true  很重要 !!!

<plugin>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-maven-plugin</artifactId>
	<configuration>
	    <mainClass>demo.DemoApp</mainClass>
		<includeSystemScope>true</includeSystemScope>
	</configuration>
</plugin>
					


验证本地jar是否打包进去了
jar tvf springboothello-1.0.jar |grep localjar


maven中的scope属性 maven知识点整理 maven处理本地jar包依赖 maven内置属性 maven snapshot 与 release maven-assembly-plugin 和 maven-shade-plugin

上一篇     下一篇
项目管理八大原则

springboot文件上传异常分析及解决方案

linux kill 命令

eclipse安装lombok

springboot2 feign 实例

feign消费端注解使用说明