Maven installation in Ubuntu 20

Distrib:
http://maven.apache.org


Maven 3 Installation:


$ mkdir -p ~/tmp && cd ~/tmp
$ wget https://apache-mirror.rbc.ru/pub/apache/maven/maven-3/3.8.2/binaries/apache-maven-3.8.2-bin.tar.gz


$ tar -xvzpf apache-maven-3.8.2-bin.tar.gz
$ sudo mv apache-maven-3.8.2/ /opt/
$ sudo ln -s /opt/apache-maven-3.8.2/ /opt/maven


$ sudo vi /etc/profile.d/maven.sh


#### MAVEN 3.8.2

export MAVEN_HOME=/opt/maven
export PATH=$PATH:$MAVEN_HOME/bin

#### MAVEN 3.8.2


$ sudo chmod 755 /etc/profile.d/maven.sh
$ source /etc/profile.d/maven.sh


Let try to check result:


$ mvn -version
java version "1.8.0_281"


Some maven commands

$ mvn help:effective-pom