网上试了很多办法都解决不了
在cmd 中执行 mvn help:system
会发现报错
原因:自己的网络使用了代理
解决:在maven中配置代理.在 setting.xml配置
<proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>proxyuser</username> <password>proxypass</password> <host>proxy.host.net</host> <port>80</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy>
其他: setting.xml配置
去 maven镜像-maven下载地址-maven安装教程-阿里巴巴开源镜像站 (aliyun.com)k
配置最新的镜像