Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Install Apache Maven on Ubuntu 22.04
#1




   

How to Install Apache Maven on Ubuntu 22.04



   

Before installing Apache Maven, your system must meet the following requirements:


   
           
  • User with sudo privileges
  •        
  • OpenJDK 1.7 or above installed on your computer or virtual private server
  •        
  • SSH client if you are using VPS services
  •    

   

Users can install Apache Maven using the Advanced Package Tool (APT) or through the official Apache Maven website.


   

Let’s start with the APT method.


   

Install Apache Maven on Ubuntu 22.04 Using APT



   

The official Ubuntu repositories contain Maven packages by default. Thus, the most convenient way to install Apache Maven is by using the APT package manager.


   

However, the Maven package version in Ubuntu repositories may differ from the official one. It may also not be the latest release.


   

Update the package index with the following Linux command:


    sudo apt-get update

   

Install OpenJDK:


    sudo apt install default-jdk

   

Verify the installation by running the following command:


    java -version

    Java version

   

Install Maven using the command below:


    sudo apt-get -y install maven

   

The default Maven installation directories are /usr/share/maven and /etc/maven. Verify the Apache Maven version using the following command:


    mvn -version

    Maven version

   

If you see a similar window, you’ve successfully installed Apache Maven on your machine.


   


   


Reply


Messages In This Thread
How to Install Apache Maven on Ubuntu 22.04 - by aaron - 09-06-2023, 10:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)