Apache Maven - Upgrading Maven to 3.3.9

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.

If you think that Maven could help your project, you can find out more information about in the "About Maven" section of the navigation. This includes an in-depth description ofwhat Maven is, a list of some of its main features, and a set of frequently asked questions about what Maven is
Java v1.7+
Remove Previous version of Maven
[root@hackthesec /]# yum erase apache-maven
Installing Apache Maven 

The installation of Apache Maven is a simple process of extracting the archive and adding the bin folder with the mvn command to the PATH.
Detailed steps are:   Ensure JAVA_HOME environment variable is set and points to your JDK installation Extract distribution archive in any directory. 
[root@hackthesec /]# cd /usr/local/   

[root@hackthesec /]# wget 
[root@hackthesec /]# unzip
[root@hackthesec /]# cd /usr/local   
[root@hackthesec /]# wget   
[root@hackthesec /]# tar xzvf apache-maven-3.3.9-bin.tar.gz  
[root@hackthesec /]# mv apache-maven-3.3.9 maven
  Alternatively use your preferred archive extraction tool.   Add the bin directory of the created directory apache-maven-3.3.9 to the PATH environment variable   Confirm with mvn -v in a new shell. The result should look similar to -
[root@hackthesec /]# mvn -vn
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)Maven home: /usr/local/maven Java version: 1.7.0_95, vendor: Oracle Corporation          
Java home: /usr/lib/jvm/java-1.7.0-openjdk-          
Default locale: en_US, platform encoding: UTF-8           
OS name: "linux", version: "4.2.4", arch: "amd64", family: "unix"

Check environment variable value
[root@hackthesec /]# echo $JAVA_HOME
Adding to PATH
export M2_HOME=/usr/local/maven           
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xmx1048m -Xms256m -XX:MaxPermSize=312M"   
export PATH=$M2:$PATH

About Author:

I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Newer Post
Older Post


Post a Comment