How to Install and Configure Apache Maven on Ubuntu 18.04

June 11, 2020 Liquid Web

Apache Maven is one of the most popular build management tools for Java projects. It employs a Project Object Model or POM utilizing an XML file to define the structure of a project, including its dependencies, documentation, and build parameters. Instead of having to manage those things individually, Maven consolidates that functionality allowing for a more streamlined and efficient project management process. 

In this video, we describe how to install and configure Apache Maven on Ubuntu 18.04.

Commands used:
apt update -y
apt install maven -y
mvn -v

wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp
tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -c /opt
ln -s /opt/apache-maven-3.6.3 /opt/maven
vim /etc/profile.d/maven.sh

export JAVA_HOME=/usr/lib/jvm/default-java
export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}

source /etc/profile.d/maven.sh
mvn -version

Video by: Justin Palmer

About the Author

Liquid Web

Liquid Web powers online content, commerce, and potential for SMB entrepreneurs and the designers, developers and digital agencies who create for them. Sign up for our <a href="https://www.liquidweb.com/blog">newsletter</a> to stay up to date with our latest content.

More Content by Liquid Web
Previous Video
How to Install Pyenv on Ubuntu 18.04
How to Install Pyenv on Ubuntu 18.04

In this video, we describe how to install pyenv on Ubuntu 18.04. Pyenv is a fantastic tool for installing a...

Next Video
Copying a Database Table with PhpMyAdmin
Copying a Database Table with PhpMyAdmin

In this video, we describe how to copy a databse in PhpMyAdmin.

Learn What Qualities to Look for in Your Next Host in Our New Guide!

Download Now