SpringBoot项目将外部依赖包 通过install 打包

场景: maven 库中没有 项目中所依赖的jar 包 只好从 三方下载 使用 ,并且将jar包添加到工程中时要求install 时一并打包

解决方案:

 

SpringBoot项目将外部依赖包 通过install 打包_第1张图片

思路和maven 库依赖是一样的 ,将所需要的包通过 加入到 pom.xml 中

groupId 、attifactId 、version  都可以自定义的 

特别注意的是: scope 必须是system  ,且将 systemPath 指定到 jar包所在的路径

配置好后还要在 maven-plugin 中添加 includeSystemScope 为true 

SpringBoot项目将外部依赖包 通过install 打包_第2张图片

结果: 打包成功 

你可能感兴趣的:(SpringBoot项目将外部依赖包 通过install 打包)