Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Maven2 Enable Proxy Setting

Related Tutorials


Share on Google+Share on Google+

Enable Proxy Setting

In this section, you will learn to enable proxy setting for Maven using setting.xml file .

Enable Proxy Setting

In this section, you will learn to enable proxy setting for Maven using setting.xml file .


Almost every organization installs a firewall  and every user connects to the internet through HTTP proxy. If Http proxy is employed by your organization, Maven will not be capable of downloading dependencies from outside. To bypass the Http proxy, you need to configure the proxy setting in Maven's configuration file(settings.xml).

Where to find setting.xml ?

You can find settings.xml inside {M2_HOME}\conf\settings.xml, ex.:-C:\apache-maven-2.2.1\conf\settings.xml.

Alternate way to enable  proxy settings

You can also enable proxy settings by creating setting.xml inside default local repository of Maven( .m2 directory) as

C:\Documents and Settings\<login-username>\.m2\settings.xml .

The configuartion is same in both condition.

Where to find .m2 directory ?

If you are using Windows XP, this should be under :

<root>\Documents and Settings\<login-username>\.m2

Ex.:- C:\Documents and Settings\roseindia\.m2

If you are using Window 7 , you can find it under :


Ex. :- C:\Users\roseindia\.m2

If you are using Unix/Mac OS X, you can find it under :


How to enable  proxy settings in  setting.xml file(configuration)?

To bypass the Http proxy, you need to enable the proxy setting in  setting.xml file as follows :

<settings xmlns=""
		<host> | ip-address</host>
		<port>80 | port-number</port>
		<nonProxyHosts> |</nonProxyHosts>



If you enjoyed this post then why not add us on Google+? Add us to your Circles

Liked it!  Share this Tutorial

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 12, 2012

Related Tutorials

Discuss: Enable Proxy Setting  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image