Monday, 21 October 2013

Proxy Settings for Maven | Eclipse

1| Create a file, settings.xml copying the below tags
2| Place it under the location, C:\Users\username\.m2\settings.xml
3| Edit the file wherever necessary

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
  <proxies>
        <proxy>
            <active>true</active>
            <protocol>http</protocol>
            <host>proxy.somewhere.com</host>
            <port>8080</port>
            <username>proxyuser</username>
            <password>password</password>
            <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
       </proxy>
  </proxies>
</settings>

4| Go to, Eclipse > Window > Preferences > Maven > User Settings
5| Check User Settings location


6| No need of restarting Eclipse to reflect changes.

2 comments: