Tip: Installing Maven 2 Behind A Proxy
If you are a java programmer you probably know the Ant build tool. However creating an Ant build script can be very complicated, and hard to maintain. The apache group recently released a new build tool called Maven (which is now in version 2), and it makes the build scripts very easy to create.
Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.
Indeed getting started with Maven is pretty strait forward, however if you are working in a corporate network and behind a firewall this simple step of configuring maven to use the corporate proxy will save you a lot of time and aggravation.
Edit your maven configuration file settings.xml under maven-2.0.x/conf
Now we need to configure a proxy. In the settings.xml file find the
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.yourcompanydomain.com</host>
<port>80</port>
<nonproxyhosts>localhost|158.187.*</nonproxyhosts>
</proxy>
Note the <nonProxyHosts> element. This element is needed to bypass proxy for local network access, such as for working with local corporate repository











RSS Feeds 



July 14th, 2008 at 9:05 am
Hey one minute when u r configuring proxy settings in maven it looks one in /.m2/settings.xml not in maven-2.0.x/conf, because I was very upset when I not getting download my artifacts, but lastly it works when I did it /.m2/settings.xml,
Is am right ?