Installing Apache Maven on Ubuntu 22.04 LTS


Apache Maven is a popular build automation tool used primarily for Java projects. It helps developers manage project dependencies, build and package their projects, and manage releases.

Maven uses a declarative XML-based file called the “pom.xml” (Project Object Model) to manage project configuration, dependencies, and build settings. It uses a standard directory layout for projects, which makes it easy to understand the structure of the project.


  • Basic knowledge of Linux commands.
  • Up and running Ubuntu 22.04 Machine
  • Root permission
  • JAVA should be installed on Ubuntu 22.04 LTS machine

In this post, We will show you how to install Apache maven build tool on ubuntu 22.04 LTS Linux machine.

Step 1: Run System Update

We need to 1st update and upgrade the current ubuntu repository to avoid difficulties situations, Use the given command for the same.

To update ubuntu repository.

sudo apt-get update

To upgrade packages (Optional)

sudo apt-get upgrade -y

Step 2: Installing Dependencies

Java package is required to use Apache Maven, Execute the following command for the same.

sudo apt-get install openjdk-11-jdk -y

after installation check Java version on your system to avoid any kind error.

java -version 

Step 3: Installing Apache Maven

Execute the following command to install Apache Maven on an Ubuntu 22.04 system in the following step:

sudo apt-get install maven -y

Step 4: Check Maven Version

To make sure the version of Apache Maven that you have installed on Ubuntu 22.04 is correct:

mvn -version


We have successfully installed Apache Maven automation build tool on ubuntu 22.04 LTS, if you still have questions, please post them in the comments section below.


Installing Apache Maven on Ubuntu 22.04 LTS

One thought on “Installing Apache Maven on Ubuntu 22.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top