Tuesday, February 3, 2015

Maven

What is Maven?

Maven is a build automation tool used primarily for Java projects.
So as Maven is a Java tool, you must have Java installed in order to proceed. 
Depending on your network setup, you may require extra configurations too.

To download Apache Maven click on the link
  • Extract the distribution archive to the directory you wish to install Maven.
    (These instructions assume you chose /usr/local/apache-maven)
  • In a command terminal, add the M2_HOME environment variable.
    e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.5.
  • Add the M2 environment variable.
    e.g. export M2=$M2_HOME/bin.
  • Optional: Add the MAVEN_OPTS environment variable to specify JVM properties.
    (This environment variable can be used to supply extra options to Maven)
  • Add M2 environment variable to your path
    e.g. export PATH=$M2:$PATH.
  • Make sure that JAVA_HOME is set to the location of your JDK.
    e.g. export JAVA_HOME=/usr/java/jdk1.7.0_51
    $JAVA_HOME/bin should be in your PATH environment variable
  • Run mvn --version to verify that it is correctly installed.
  •  
     
For more details you can refer to Apache Maven

No comments:

Post a Comment