score:4

eclipse by default does not know about your external maven installation and uses the embedded one. therefore in order for eclipse to use your global settings you need to set it in menu settingsmaveninstallations.

score:34

<?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>somepassword</password>
          <nonproxyhosts>www.google.com|*.somewhere.com</nonproxyhosts>
        </proxy>
      </proxies>

    </settings>

window > preferences > maven > user settings

enter image description here

score:112

maven plugin uses a settings file where the configuration can be set. its path is available in eclipse at window|preferences|maven|user settings. if the file doesn't exist, create it and put on something like this:

<settings xmlns="http://maven.apache.org/settings/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"
  xsi:schemalocation="http://maven.apache.org/settings/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localrepository/>
  <interactivemode/>
  <usepluginregistry/>
  <offline/>
  <plugingroups/>
  <servers/>
  <mirrors/>
  <proxies>
    <proxy>
      <id>myproxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>192.168.1.100</host>
      <port>6666</port>
      <username></username>
      <password></password>
      <nonproxyhosts>localhost|127.0.0.1</nonproxyhosts>
    </proxy>
  </proxies>
  <profiles/>
  <activeprofiles/>
</settings>

after editing the file, it's just a matter of clicking on update settings button and it's done. i've just done it and it worked :)


Related Query

More Query from same tag