Configure network proxy settings for maven

By default, maven uses default network connection running on your local system. But, sometimes you are running your application in your workplace or company. These networks shields their intranet through proxy servers, so all internet queries made from your system goes through this proxy server.

Maven by default does not respect them, and to use maven in these restricted areas, you may need to configure network proxy settings for maven.

To setup proxy settings, follow below steps:

  • Navigate to path : C:Documents and Settings.m2
  • Open file settings.xml in edit mode in some text editor.
  • Open and update tag.

This tag will look like this:


Update above fields with your network specific credentials. They must be present in your browser’s connection settings. Use them here.

After above steps, you should be able to use maven behind proxy servers also.

Happy Learning !!


I have 7 Years of rich experience in java technology. This has only increased my hunger to learn more. In this blog, i will be writing on different topics occasionally, and would love to engage in some meaningful serious discussions with you folks.

You may also like...

Note:- In comment box, please put your code inside [java] ... [/java] OR [xml] ... [/xml] tags otherwise it may not appear/post as intended.

Want to ask any question? Or suggest anything?