Springboot如何在maven的pom.xml中添加本地jar包

1.Springboot引入本地jar包,使用maven方式

jar包名称:cloud-common-1.0.0.jar

将jar包放入到D盘根目录(文件路径可以自己选择)

//进入jar包所在的路径
D:
//将jar包加入到本地maven库
mvn install:install-file -Dfile=cloud-common-1.0.0.jar -DgroupId=dhcc.sass.cloud -DartifactId=cloud-common -Dversion=1.0.0 -Dpackaging=jar

 

2.在pom.xml中引入包

<dependency>
     <groupId>dhcc.sass.cloud</groupId>
     <artifactId>cloud-common</artifactId>
     <version>1.0.0</version>
</dependency>

3.本地maven库

C:\Users\sunny\.m2\settings.xml

猜你喜欢

转载自blog.csdn.net/sunhuansheng/article/details/86016509