Wednesday, January 22, 2014

How to Install Maven (Apache Maven)

Installing Maven on your system is a trivial task. Fully functional ready to use distributions are available at http://maven.apache.org.

  1. You can download the latest Maven distribution from the following link http://maven.apache.org/download.cgi
  2. Then extract the downloaded tar ball. You can do this by the following command
    tar zxvf apache-maven-<version>-bin.tar.gz
    
  3. Add maven bin directory to the PATH environment variable
    export PATH=<maven-location>/bin:$PATH
    
  4. Set M2_HOME environment variable
    export M2_HOME=<maven-location>
    
Now maven is ready to run on your system

Try the following command from any location to confirm Maven is working properly.


mvn –version

No comments:

Post a Comment