0

How to configure Maven to use proxy to connect to the network

Background

This article demonstrates how configure Apache Maven to use proxy to connect to the network.

Software Environment

  • Windows 7 Professional SP1
  • Apache Maven 3.1.1
  • Java 1.7 (1.7.0_67 – Windows x86)

Modify conf/settings.xml

  1. Download the Apache Maven from http://maven.apache.org/
  2. Extract the zip file to some directory
  3. Navigate to conf directory and open settings.xml

Modify the proxies tag

Add the <proxy></proxy> tags within <proxies></proxies>. Below is a sample set up for <proxy>.