Facebooktwittergoogle_plusredditpinterestlinkedinmail

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.

Prerequisites: 

Maven 3.3 requires JDK 1.7 or above to execute – it still allows you to build against 1.3 and other JDK versions by Using Toolchains

RHEL/CentOS/Fadora Installation

sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version

Alternate Way:

wget http://mirror.olnevhost.net/pub/apache/maven/binaries/apache-maven-3.2.1-bin.tar.gz
sudo tar xzf apache-maven-3.2.1-bin.tar.gz -C /usr/local
cd /usr/local
sudo ln -s apache-maven-3.2.1 maven

Setup Maven Path:

Create maven.sh under profile.d define maven path and append it in PATH env variable.

sudo vi /etc/profile.d/maven.sh

and add below lines:

export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}

Load the environment variable in current shell

source /etc/profile.d/maven.sh

Verify the installation

mvn -version
How to Install Maven on Linuxhttp://techieroop.com/wp-content/uploads/2017/02/How-To-Install-Maven-On-Linux.pnghttp://techieroop.com/wp-content/uploads/2017/02/How-To-Install-Maven-On-Linux-150x150.png Roopendra 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.Prerequisites: Maven 3.3 requires JDK 1.7 or above to execute - it still allows you to...
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.<strong>Prerequisites: </strong>Maven 3.3 requires JDK 1.7 or above to execute - it still allows you to build against 1.3 and other JDK versions <a href="https://maven.apache.org/guides/mini/guide-using-toolchains.html">by Using Toolchains</a> <h2 style="text-align: center;"><span style="color: #008000;">RHEL/CentOS/Fadora Installation</span></h2> <pre>sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo sudo yum install -y apache-maven mvn --version</pre> <h3>Alternate Way:</h3> <pre>wget http://mirror.olnevhost.net/pub/apache/maven/binaries/apache-maven-3.2.1-bin.tar.gz sudo tar xzf apache-maven-3.2.1-bin.tar.gz -C /usr/local cd /usr/local sudo ln -s apache-maven-3.2.1 maven</pre> <h3>Setup Maven Path:</h3> Create maven.sh under profile.d define maven path and append it in PATH env variable. <pre>sudo vi /etc/profile.d/maven.sh</pre> and add below lines: <pre>export M2_HOME=/usr/local/maven export PATH=${M2_HOME}/bin:${PATH}</pre> Load the environment variable in current shell <pre>source /etc/profile.d/maven.sh</pre> Verify the installation <pre>mvn -version</pre>
(Visited 1,280 times, 201 visits today)
Facebooktwittergoogle_pluslinkedinrss