idea maven项目引入本地jar包
项目参考:https://cloud.tencent.com/developer/article/2019464#:~:text=IDEA导入jar包%201.进入idea界面点右上角的“project%20structure”。,2.进入“project%20structure”界面后%2C选择%20“libraries”选项。
1.引入jar包到项目中
2.在pom文件中引入本地jar包
# systemPath 是本地引入jar包的地址
<dependency>
<groupId>com.</groupId>
<artifactId>xxxx_common</artifactId>
<version>0.0.9</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/xxxx_common-0.0.9.jar</systemPath>
</dependency>
在maven的依赖中可以看到本地引入的jar包
3.在pom文件引入插件
pom -> build -> plugins节点引入
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
4.查看项目打包后里面是否包含本地引入的jar包
在lib包下,可以看到本地引入的jar包.