Friday, April 17, 2015

Using maven3 with proxy

Edit (or create) the file ~/.m2/settings.xml

Add the following

<settings>
  <proxies>
   <proxy>
      <id>fw1</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>fw1</host>
      <port>3128</port>
      <nonProxyHosts>localhost</nonProxyHosts>
    </proxy>
   <proxy>
      <id>fw1</id>
      <active>true</active>
      <protocol>https</protocol>
      <host>fw1</host>
      <port>3128</port>
      <nonProxyHosts>localhost</nonProxyHosts>
    </proxy>
  </proxies>
</settings>