到中央仓库 地址 http://mvnrepository.com/
找到你要的包
在cmd命令行输入指令
mvn dependency:get -DremoteRepositories=url -DgroupId=groupId -DartifactId=artifactId -Dversion=version
命令需要修改替换其中的url、groupId、artifactId、version
以我要添加的goole-collections为例:
mvn dependency:get -DremoteRepositories=https://mvnrepository.com/artifact/com.google.collections/google-collections -DgroupId=com.google.collections -DartifactId=google-collections -Dversion=1.0
命令执行完成就可以看出本地仓库中我要的jar包已经下载完成