A, cmd into the maven's bin directory (My directory E:\cloud_cms\apache-maven-3.5.4\bin
)
cd E:\cloud_cms\apache-maven-3.5.4\bin
Second, run the command
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>
runmvn install:install-file -Dfile=E:\cloud_cms\mail-1.4.jar -DgroupId=javax.mail -DartifactId=mail -Dversion=1.4 -Dpackaging=jar
Author: Dong Fangyu Xiao _ Say Kwan early
link: https: //www.jianshu.com/p/280c0f75a217