Install Maven on Ubuntu
Download and Install Maven on Ubuntu
First need to make sure java is install already
1 | java -version |
Download maven binary using wget
1 | wget http://mirror.reverse.net/pub/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz -P /tmp |
extract to /opt folder
1 | sudo tar xf /tmp/apache-maven-*.tar.gz -C /opt |
rename the folder
1 | cd /opt |
set environment variable(can be in ~/.bashrc file). Maven Home directory is /opt/apache-maven.
1 | export M3_HOME=/opt/apache-maven |
Check maven version
1 | $ mvn -version |
The global level configuration file is located at
- /opt/apache-maven/conf/settings.xml
The user level configuration file is located at
- ~/.m2/settings.xml