Skip to content

Instantly share code, notes, and snippets.

@baijian
Created January 18, 2013 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baijian/4561566 to your computer and use it in GitHub Desktop.
Save baijian/4561566 to your computer and use it in GitHub Desktop.
maybe when you new project using maven, when downloading *.jar, so slow, so you can set a proxy
~/.m2/settings.xml
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
if you proxy is SSH tunnel,then
export MAVEN_OPTS="-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=$PORT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment