title: Configuring maven for proxy
body: <p>I'm new to maven build tool, but I'm not able to configure maven for proxy server.</p>
  
  <p>In the <code>/usr/share/maven/settings.xml</code> 
  I added the following lines:</p>
  
  <pre><code>  &lt;proxies&gt;
    &lt;proxy&gt;
        &lt;active&gt;true&lt;/active&gt;
        &lt;protocol&gt;http&lt;/protocol&gt;
        &lt;host&gt;proxy.foo.bar.com (http://proxy.foo.bar.com/)&lt;/host&gt;
        &lt;port&gt;911&lt;/port&gt;
      &lt;/proxy&gt;
      &lt;proxy&gt;
        &lt;active&gt;true&lt;/active&gt;
        &lt;protocol&gt;https&lt;/protocol&gt;
        &lt;host&gt;proxy.foo.bar.com (https://proxy.foo.bar.com/)&lt;/host&gt;
        &lt;port&gt;911&lt;/port&gt;
      &lt;/proxy&gt;
   &lt;proxy&gt;
  &lt;/proxies&gt;
  </code></pre>
  
  <p>But when I do mvn package.
  I get the errors:</p>
  
  <pre><code>Downloading: http://repo1.maven.org/maven2 (http://repo1.maven.org/maven2)/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 0.245s
  [INFO] Finished at: Thu Dec 27 10:10:30 PST 2012
  [INFO] Final Memory: 3M/87M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.3: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.3 from/to Central (http://repo1.maven.org/maven2 (http://repo1.maven.org/maven2)): IllegalArgumentException: Illegal character in path at index 29: http://repo1.maven.org/maven2 (http://repo1.maven.org/maven2)/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
  </code></pre>
  
  <p>How do I resolve this?</p>