Maven 添加本地Jar

2021-09-03  本文已影响0人  GCZeng

把Jar添加到Maven本地仓库

mvn install:install-file -Dfile=xxx.jar -DgroupId=org.test -DartifactId=tools -Dversion=1.0 -Dpackaging=jar

参数说明

Dfile: JAR文件的本地路径
DgroupId: groupId(自行填写,引用时需要一致)
DartifactId: artifactId (自行填写,引用时需要一致)
Dversion: 版本号
Dpackaging: JAR(打包类型)

在pom.xml文件中引用

<dependency>
  <groupId>org.test</groupId>
  <artifactId>tools</artifactId>
  <version>1.0</version>
</dependency>
上一篇 下一篇

猜你喜欢

热点阅读