I am using Ubuntu 14.04. I need to run mvn 3.3.3
. Currently, the installed mvn version 3.0.5. When I enter
sudo apt-get install maven
it says
maven is already the newest version
is there a way to force install mvn 3.3.3?
Add a ppa containing maven 3.3.3, for example this one by executing these instructions on the command-line:
sudo apt-get purge maven maven2 maven3
sudo add-apt-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3
If you are not comfortable with a PPA (personal package archive) where you have no assurance of the provenance this is an alternative.
From a security perspective if you don't know where it came from don't install it.
In my linked article I retrieve the latest file from apache which is a known and trusted source. You can get the latest version
\#identify the latest version of maven latest=$(curl http://www-us.apache.org/dist/maven/maven-3/ | tac | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,3\}[0-9]\).*/\1/p' | head -1) \#download it wget http://www-us.apache.org/dist/maven/maven-3/$latest/binaries/apache-maven-$latest-bin.tar.gz
then install it from
\#Unpack it sudo tar -zxf apache-maven-$latest-bin.tar.gz -C /usr/local/ \#create a sym link to it sudo ln -s /usr/local/apache-maven-$latest/bin/mvn /usr/bin/mvn
as outlined in the link above.
I just installed maven 3.2.5. To do that I downloaded the version I wanted as noted.
Unzipped using: tar -xvf apache-maven-3.2.5-bin.tar.gz
to: /opt/ and let p7zip do its thing.
Then in the terminal I did the following:
Check environment variable value: echo $JAVA_HOME
Adding to PATH:
export PATH=/opt/apache-maven-3.2.5/bin:$PATH
reviewed the output
For me the above worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With