I tried to install Maven to Ubuntu but something goes wrong.
I downloaded Maven and untarred it to folder /usr/local/apache-maven/apache-maven-3.0.4.
Then I added these rows to /etc/environment.
export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.4
export M2=$M2_HOME/bin
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$JAVA_HOME:$JRE_HOME:$M2:$PATH"
But when I try to verify my installation by mvn --version
I get this message
'The program 'mvn' can be found in the following packages: * maven * maven2 Try: sudo apt-get install '
SOLVED. Sorry that if forget to reply to this. I added export rows to ~/.bashrc and after that it started to work.