1.把下好的jar包放在一个文件夹
2.cmd进入该文件夹
3.执行 mvn install:install-file -Dfile=path-to-file -DgroupId=group-id -DartifactId=artifact-id -Dversion=version -Dpackaging=packaging
例如:
<!-- 验证码 --><!-- https://mvnrepository.com/artifact/com.google.code.kaptcha/kaptcha -->
<dependency>
<groupId>com.google.code.kaptcha</groupId>
<artifactId>kaptcha</artifactId>
<version>2.3.2</version>
</dependency>
命令为:
mvn install:install-file -Dfile=D:\xxx.jar //jar包位置
-DgroupId=com.google.code.kaptcha
-DartifactId=kaptcha
-Dversion=2.3.2
-Dpackaging=jar