idea 使用外包本地包

方式一:通过mvn命令将包打到本地仓库

然后pom添加引用

方式二:直接在pom文件中添加引用

<dependency >

<groupId >com.zysj</groupId >

<artifactId >zwdd-sdk-java-1.1.9</artifactId >

<version >1.1.9</version >

<scope >system</scope >

<systemPath >${basedir}/src/main/resources/lib/zwdd-sdk-java-1.1.9-1.1.9.jar</systemPath >

</dependency>

在打包时需要额外增加 <includeSystemScope >true</includeSystemScope>

<build >

<plugins >

<plugin >

<groupId >org.springframework.boot</groupId >

<artifactId >spring-boot-maven-plugin</artifactId >

<configuration >
<!--<scope>system</scope> 时也打包进jar -->

<includeSystemScope >true</includeSystemScope >

</configuration >

</plugin >

<!-- 跳过单元测试 -->

<plugin >

<groupId >org.apache.maven.plugins</groupId >

<artifactId >maven-surefire-plugin</artifactId >

<configuration >

<skipTests >true</skipTests >

</configuration >

</plugin >

</plugins >

</build>

相关推荐
麦兜*1 小时前
Spring Boot 企业级动态权限全栈深度解决方案,设计思路,代码分析
java·spring boot·后端·spring·spring cloud·性能优化·springcloud
ruan1145142 小时前
MySQL4种隔离级别
java·开发语言·mysql
Hellyc6 小时前
基于模板设计模式开发优惠券推送功能以及对过期优惠卷进行定时清理
java·数据库·设计模式·rocketmq
lifallen6 小时前
Paimon LSM Tree Compaction 策略
java·大数据·数据结构·数据库·算法·lsm-tree
hdsoft_huge6 小时前
SpringBoot 与 JPA 整合全解析:架构优势、应用场景、集成指南与最佳实践
java·spring boot·架构
百锦再7 小时前
详细解析 .NET 依赖注入的三种生命周期模式
java·开发语言·.net·di·注入·模式·依赖
程序员的世界你不懂7 小时前
基于Java+Maven+Testng+Selenium+Log4j+Allure+Jenkins搭建一个WebUI自动化框架(2)对框架加入业务逻辑层
java·selenium·maven
有没有没有重复的名字8 小时前
线程安全的单例模式与读者写者问题
java·开发语言·单例模式
程序员的世界你不懂10 小时前
基于Java+Maven+Testng+Selenium+Log4j+Allure+Jenkins搭建一个WebUI自动化框架(4)集成Allure报表
java·selenium·maven
isNotNullX10 小时前
数据中台架构解析:湖仓一体的实战设计
java·大数据·数据库·架构·spark