把Jar添加到Maven本地倉庫
mvn install:install-file -Dfile=xxx.jar -DgroupId=org.test -DartifactId=tools -Dversion=1.0 -Dpackaging=jar
參數(shù)說明
Dfile: JAR文件的本地路徑
DgroupId: groupId(自行填寫峦朗,引用時需要一致)
DartifactId: artifactId (自行填寫之碗,引用時需要一致)
Dversion: 版本號
Dpackaging: JAR(打包類型)
在pom.xml文件中引用
<dependency>
<groupId>org.test</groupId>
<artifactId>tools</artifactId>
<version>1.0</version>
</dependency>