先说解决方案,再说废话
万分感谢 v2ex.com/t/510461 中 "v2ex用户: xbigfat" 的回答
解决方案:在maven的
setting.xml的<proxies> 中分别设置http与https的代理,单单设置http代理不行
<proxy>
<id>forHttp</id>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>1081</port>
<nonProxyHosts>localhost.com|127.0.0.1</nonProxyHosts>
</proxy>
<proxy>
<id>forHttps</id>
<active>true</active>
<protocol>https</protocol>
<host>127.0.0.1</host>
<port>1081</port>
<nonProxyHosts>localhost.com|127.0.0.1</nonProxyHosts>
</proxy>
注意:
- http与https代理的 host 与 port 根据你们的代理软件自行配置。在我的代理软件中http与https端口配置都是1081
- 更新的时候更新默认的apache仓库,实测
nexus-maven-repository-index.gz5分钟下载完成,之后idea花了大概10分钟解压索引