Tuesday, February 17, 2015

Install Maven from archive

Why Maven ?

Apache 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.
  •     Quick project set-up, no complicated build.xml files, just a POM and go
  •     All developers in a project use the same jar dependencies due to centralized POM.
  •     Getting a number of reports and metrics for a project "for free"
  •     Reduce the size of source distributions, because jars can be pulled from a central location
Make sure you installed Java and exported JAVA_HOME in your PATH variable.

Verify java installation on your machine
$java -version 
$javac -version
Download maven
Extract Maven archive
$sudo cp ~/Downloads/apache-maven-*.tar.gz /usr/local/
$sudo su -
$cd /usr/local
$tar -xzf apache-maven-3.1.1-bin.tar.gz

Set maven environment variables (vi ~/.bashrc or /etc/profiles)
export M2_HOME=/usr/local/apache-maven-x.x.x
export MAVEN_OPTS="-Xms256m -Xmx512m"

Add maven bin directory to system path
export PATH=$PATH:$M2_HOME/bin
Verify Maven installed
$mvn -version

References : Maven

No comments :

// Below script tag for SyntaxHighLighter