How to install Maven on Ubuntu

Maven, the product of Apache, is a tool used in project management and comprehensive, mostly java-based projects. It is based on POM (Project Object Model). Maven can simplify the project building process. It looks like Apache ANT but is a lot more advanced than ANT because of the conventions used for Maven build procedures. XML files in Maven describe dependencies, build order, required plug-ins, directories, etc…

  • Installation manuals

First you need to check if your machine has Java installed or not. To install Maven 3.3 you should install JDK 1.4 in your machine. Using SSH, access your VPS and update your package index before installing Java:

# sudo apt update

This article we will guide you to install Apache Maven available on Ubuntu

Use Apt

Here is a simple method, the reason is because the current Maven package already defaults in Ubuntu. However you still need to make sure they are the latest packages

First of all you will also have to use the following command to install the default open JDK for Ubuntu:

# apt-get update
# sudo apt install default-jdk

Use the command to verify and check the version after the installation is complete

# sudo apt install default-jdk

Use the command to update the index in the package

# sudo apt-get update

Maven command install in Maven in / usr / share / Maven and / etc / Maven

# sudo apt-get -y install maven

Use commands to verify installation and check version

# mvn -version

So you have finished installing Maven on Ubuntu using Apt.

On this page