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 小时前
【C#】 lock 关键字
java·开发语言·c#
humiaor1 小时前
Xcode报错:“Set `maskView` to `nil` before adding it as a subview of ZFMaskView
ide·macos·xcode·ios18报错
tmacfrank2 小时前
网络编程中的直接内存与零拷贝
java·linux·网络
weixin_472339463 小时前
Maven 下载安装与配置教程
java·maven
Magnum Lehar4 小时前
3d游戏引擎EngineTest的系统实现3
java·开发语言·游戏引擎
就叫飞六吧4 小时前
Spring Security 集成指南:避免 CORS 跨域问题
java·后端·spring
Mcworld8574 小时前
java集合
java·开发语言·windows
谢尔登4 小时前
【VSCode】修改侧边文件资源管理器中的文件夹折叠模式
ide·vscode·编辑器
天黑请闭眼4 小时前
IDEA:程序编译报错:java: Compilation failed: internal java compiler error
java·intellij-idea
hnlucky5 小时前
windows编写和调试代码工具——IDE安装
ide·windows