maven将手动下载的jar包安装到本地仓库

时间:2021-05-18 09:12:18
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.google.code.kaptcha</groupId>
<artifactId>kaptcha</artifactId>
<version>2.3</version>
</project>

将上面的pom.xml和jar文件放到同一文件夹下,执行下面的命令

 

mvn install:install-file -Dfile=C:\test_jar\kaptcha-2.3.jar -DgroupId=com.google.code.kaptcha -DartifactId=kaptcha -Dversion=2.3 -Dpackaging=jar

 

参考博客:http://www.cnblogs.com/tangshengwei/p/6341628.html