Steps to install Maven on Linux

Note: We are installing Maven on Ubuntu Linux (20.04 LTS)

Step 1: Update local packages

  • sudo apt update: This command is used to update the local package index on your machine.
  • sudo apt upgrade: This command is used to upgrade the installed packages on your system to the latest available versions.
sudo apt update && sudo apt upgrade -y

Step 2: Install JDK

Since Maven is primarily built using Java. Install JDK. You need the Java Development Kit (JDK) in addition to the JRE in order to compile and run Java-based software. To install the JDK, execute the following command, which will also install the JRE:

sudo apt install  openjdk-11-jdk

Step 3: Verify Installation

java --version

Step 4: Install Maven.

sudo apt install maven -y

Step 5: Verify Installation

mvn --version

How To Install Maven On Linux?

Maven is your software program development sidekick! Maven, crafted using the Apache Software Foundation, is the go-to device for simplifying the complex international of build automation and task management. It’s designed to permit you to be conscious of coding while effortlessly managing obligations like constructing, checking out, and deploying initiatives.

Think of Maven as your task agency wizard. With its XML-based configuration, Maven makes mission management a breeze, thanks to the usage of conventions that assist you in diving instantly into improvement without getting slowed down through construction process intricacies.

Similar Reads

Steps to install Maven on Linux

Note: We are installing Maven on Ubuntu Linux (20.04 LTS)...

Manual Installation

Step 1: This command is used to update the local package index on your machine....

Install Maven on linux – FAQ’s

Does Maven require Java to be installed on my system?...