jar安装到maven本地仓库

1.命令:

mvn install:install-file -DgroupId=com.allinpay -DartifactId=yunst-sdk -Dversion=0.0.1 -Dpackaging=jar -Dfile=/root/.m2/yunst-sdk-0.0.1-SNAPSHOT.jar

2.安装后的依赖

        <dependency>
            <groupId>com.allinpay</groupId>
            <artifactId>yunst-sdk</artifactId>
            <version>0.0.1</version>
        </dependency>

3.说明 

只需修改DgroupId、DartifactId、Dversion的值即可

-Dfile:jar存放的位置,安装前放置好,安装完可以删除

stay hungry stay foolish!
原文地址:https://www.cnblogs.com/shog808/p/14421184.html