Linux – How to update maven version on ubuntu machine

javalinuxmavenUbuntu

I am working on Ubuntu linux machine. When I open a terminal window and type :

mvn -v

I got the output:

Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-33-generic" arch: "i386" Family: "unix"

As you saw above, my current maven version is 2.2.1 , I am wondering, how can I update my maven to verstion 3 ?

What I tried: I have downloaded maven v3.0.3 binary version, and add the /apache-maven-3.0.3/bin/ path in .bash_profile file, but when I use mvn -v command, it still shows version 2…

Best Answer

change the path on .bashrc instead, also remember to restart you terminal application after the changes

you need to add something like this, perhaps?

export PATH=$HOME/apache-maven-3.0.3/bin/:$PATH
Related Question