Maven Set Up

 

Why use Maven?

  • Maven provides dependency Management, where you define all the required libraries in pom( project object model) file and Maven takes the responsibility of downloading all the required libraries.
  • Project set up becomes a breeze as you can use existing archetypes to build the project template.
  • Very well integrated with eclipse. Maven is part of eclipse kepler version. You don;t have to download m2e connectors any more.
  • Provides common project structure.
  • Build management 
 
Maven Setup
 
Step 1:
    Download Maven Binary Zip from http://maven.apache.org/download.cgi
 
Step 2:
    Extract the downloaded zip file to c:\maven305 . 
 
Step 3:
    In Environment Variables of the system:
        Set JAVA_HOME variable pointing to your local jdk installation.
        Add C:\maven305\bin to the path variable.
 
Step 4:
    From Command Window run mvn -version

C:\>mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
Maven home: C:\maven305\bin\..
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: C:\jdk1635\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
 
Step 5:
   
    To change the local repository location add
 
<localRepository>c:/maven-jars</localRepository>
 
    
        If you are behind a firewall, you will have to provide the proxy settings for maven to download the jars from Maven                Repository.
 
<proxy>
          <id>optional</id>
          <active>true</active>
          <protocol>http</protocol>
          <username>proxyuser</username>
          <password>proxypass</password>
          <host>host</host>
          <port>port</port>
          <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
 
 
That's It !
Web Analytics