美文网首页
Maven 添加本地Jar

Maven 添加本地Jar

作者: GCZeng | 来源:发表于2021-09-03 16:22 被阅读0次

把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>

相关文章

网友评论

      本文标题:Maven 添加本地Jar

      本文链接:https://www.haomeiwen.com/subject/mmykwltx.html