<!--先下載jar包,然后在倉庫中手動安裝,下面是遇到的兩個例子-->
<!--第一個-->
mvn install:install-file -Dfile=D:\kaptcha-2.3.jar -DgroupId=com.google.code.kaptcha -DartifactId=kaptcha -Dversion=2.3 -Dpackaging=jar -DgeneratePom=true
<!--第二個-->
mvn install:install-file -Dfile=D:\fastdfs-client-java-1.27-RELEASE.jar -DgroupId=org.csource -DartifactId=fastdfs-client-java -Dversion=1.27-RELEASE -Dpackaging=jar -DgeneratePom=true
這樣做如果還是遇到依賴無法下載,需要檢查一下maven的配置文件,conf下的setting.xml文件中是否設置了代理。代理需要設置正確。
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>你的域名</host>
<port>你的端口</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>