这个问题我遇到过,如果楼主不想使用国内镜像,想走代理的话,按照我这个了来~
1.打开 IDEA 的 Preference - Build Execution,Deployment - Build Tools - Maven
2.找到 Use Setting File 选择你的自定义 xml 文件,setting.xml ,勾选 Override
3.在 setting.xml 文件中写入
```
<settings xmlns="
http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>forHttp</id>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>1087</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>1087</port>
<nonProxyHosts>
localhost.com|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
</settings>
```
配置信息自己看~对应填即可