It's a very annoying problem...
Maven cannot connect out directly from work network. Also, it won't use your browser proxy settings.
Even you configure your maven into your eclipse, it will not use your eclipse settings either.
So you have to configure the "apache-maven-xxx\conf\settings.xml."
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>xxx</username>
<password>xxx</password>
<host>xxx</host>
<port>8080</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
Then, maybe you need toreboot your machine to make it work.
Mine was not working for quite a long time. I don't know why. But when reboot my machine, it works.
转载于:https://www.cnblogs.com/anbosun/p/6027380.html