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>

相关推荐
无糖冰可乐211 小时前
IDEA多java版本切换
java·ide·intellij-idea
合作小小程序员小小店1 小时前
web开发,在线%超市销售%管理系统,基于idea,html,jsp,java,ssh,sql server数据库。
java·前端·sqlserver·ssh·intellij-idea
brucelee1861 小时前
IntelliJ IDEA 设置 Local History 永久保留
java·ide·intellij-idea
Pluto_CSND3 小时前
Java中的静态代理与动态代理(Proxy.newProxyInstance)
java·开发语言
百***46454 小时前
Java进阶-在Ubuntu上部署SpringBoot应用
java·spring boot·ubuntu
serve the people4 小时前
Prompts for Chat Models in LangChain
java·linux·langchain
一叶飘零_sweeeet5 小时前
不止于 API 调用:解锁 Java 工具类设计的三重境界 —— 可复用性、线程安全与性能优化
java·工具类
buvsvdp50059ac6 小时前
如何在VSCode中设置Python解释器?
ide·vscode·python
A阳俊yi6 小时前
Spring Data JPA
java·开发语言
小王不爱笑1326 小时前
Spring AOP(AOP+JDBC 模板 + 转账案例)
java·后端·spring