I had maven and maven2 installed. I took it down with the command sudo apt-get remove maven*
- downloaded from off.site latest version of apache-maven-3.3.9-bin.zip
- unpacked the archive in /opt/maven
- renamed apache-maven-3.3.9 to apache_maven_3.3.9 now in the specified directory there are two apache_maven_3.3.9 directories apache-maven-3.3.9-bin.tar.gz
- set the environment variable M2_HOME " export M2_HOME=/opt/maven " to the /etc/profile file
- set the PATH export PATH=$PATH:$M2_HOME/bin environment variable export PATH=$PATH:$M2_HOME/bin to the /etc/profile file
after checking the installation is correct, typing mvn -version on the command line
The 'mvn' application can be found in the following packages:
* maven
* maven2
Try: sudo apt-get install <selected package>
I chose maven2
After installation, I check what happened. answer
Apache Maven 2.2.1 (rdebian-14)
Java version: 1.8.0-ea
Java home: / usr / lib / jvm / java-8-oracle / jre
Default locale: en_UA, platform encoding: UTF-8
OS name: "linux" version: "3.16.0-51-generic" arch: "amd64" Family: "unix"
What have I done wrong? Why is the version installed 2.2.1 and not the one that I registered 3.3.9 ?