idea maven项目引入本地jar包

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包.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值