一、cmd进入maven的bin目录下(我的目录是E:cloud_cmsapache-maven-3.5.4in)
cd E:cloud_cmsapache-maven-3.5.4in

1.png
二、运行命令
mvn install:install-file -Dfile=jar包的路径 -DgroupId=gruopId中的内容 -DartifactId=actifactId的内容 -Dversion=version的内容 -Dpackaging=jar
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
运行mvn install:install-file -Dfile=E:cloud_cmsmail-1.4.jar -DgroupId=javax.mail -DartifactId=mail -Dversion=1.4 -Dpackaging=jar

2.png

3.png
作者:东方欲晓_莫道君行早
链接:https://www.jianshu.com/p/280c0f75a217