
In the /opt directory: sudo tar xf /tmp/apache-maven-*.tar.gz -C /opt Once the download is completed, extract the archive Before continuing with the next step, visit the Maven download pageĭownload the Apache Maven in the /tmp directory: wget -P /tmp OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)Īt the time of writing this article, the latest version of Apache Maven is 3.6.3. OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1) The output should look something like this: openjdk version "11.0.7" Verify the installation by running the following command: java -version , by typing: sudo apt update sudo apt install default-jdk


Maven 3.3+ requires JDK 1.7 or above to be installed. In this section, we’ll provide a step by step instructions about how to download and install the latest Apache Maven version on Ubuntu 20.04. Installing the Latest Release of Apache Maven # Maven is now installed on your system, and you can start using it. Java version: 11.0.7, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64ĭefault locale: en_US, platform encoding: UTF-8 The output should look something like this: Apache Maven 3.6.3 To verify the installation, run mvn -version: mvn -version

Update the package index and install Maven by entering the following commands: sudo apt update sudo apt install maven Installing Maven on Ubuntu using apt is a simple, straightforward process. How to install Apache Maven on Ubuntu 18.04? Installing Apache Maven on Ubuntu 20.04 with apt # The instructions assume that you are logged in as root or user with sudo privileges To install the latest version of Maven, follow the instructions provided in the second part of this article that shows how to download the binary distribution archive from their official website.Ĭhoose the installation method that is most appropriate for your setup and environment. However, the version included in the repositories may lag behind the latest version of Maven. This is the easiest way to install Maven on Ubuntu.

The official Ubuntu repositories contain Maven packages that can be installed with the apt package manager. In this tutorial, we will show you two different ways to install Apache Maven on Ubuntu 20.04. Maven uses a Project Object Model (POM), which is essentially an XML file containing information about the project, configuration details, the project’s dependencies, and more. Apache Maven is an open-source project management and comprehension tool used primarily for Java projects.
