Add Proxy Server Maven

Add Proxy Server Maven

Working with maven project always needs to download all of its dependencies from maven remote repository and for local network example if you working on your home network there won’t be any issues downloading dependencies jars but it will be problematic if you working on corporate network where every company uses proxy server for any incoming or outgoing communication. So to work with maven on corporate network you will have to configure proxy server to get all the dependencies jar from to remote location. There are many ways you could find your company proxy server address by asking your colleague, system administrator, immediate supervisor and most probably they will tell you the proxy address but due to some reason if they are all does not know about proxy then you will have to find by yourself. To find proxy by yourself and please follow steps from this tutorial. Now you found proxy server address please go to you MAVEN_HOME/config and open settings.xml file and add below tag:

  • Most of the time company proxy don’t need user name and password and it validate user id using system configuration:

  • If company network is using user and password in proxy please use below:

  • Complete default settings.xml file structure:

  • For more information please visit maven documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *