This is a small guide to install maven on ubuntu 20.04 LTS. Jul 28, 2021

  1. Download maven from https://maven.apache.org/download.cgi click the link apache-maven-3.8.1-bin.tar.gz.

  2. Extract the files in your downloads folder.

    cd Downloads

    sudo tar xzvf apache-maven-3.8.1-bin.tar.gz -C/opt/

  3. In a terminal window enter the following.

    nano .profile

Edit the file and add the following text at the bottom of the page.

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

export JAVA_HOME

MAVEN_HOME=/opt/apache-maven-3.8.1

export MAVEN_HOME

PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH

export PATH 

Now press ctrl + O to save the file, and ctrl + X to close the file.

  1. Back in the terminal run the script with.

    . .profile

Check the version of java and maven with the commands.

`java --version`

`mvn --version` 

Now you should see the proper version of Maven installed.

If you open a new terminal window and the installation seems ineffective: LOGOUT AND LOGIN!!!**

Answer from MalcolmXYZ on Stack Overflow
๐ŸŒ
Apache Maven
maven.apache.org โ€บ install.html
Installation โ€“ Maven
2 days ago - To install Apache Maven, extract the archive and add its bin directory to the PATH.
Top answer
1 of 4
21

This is a small guide to install maven on ubuntu 20.04 LTS. Jul 28, 2021

  1. Download maven from https://maven.apache.org/download.cgi click the link apache-maven-3.8.1-bin.tar.gz.

  2. Extract the files in your downloads folder.

    cd Downloads

    sudo tar xzvf apache-maven-3.8.1-bin.tar.gz -C/opt/

  3. In a terminal window enter the following.

    nano .profile

Edit the file and add the following text at the bottom of the page.

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

export JAVA_HOME

MAVEN_HOME=/opt/apache-maven-3.8.1

export MAVEN_HOME

PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH

export PATH 

Now press ctrl + O to save the file, and ctrl + X to close the file.

  1. Back in the terminal run the script with.

    . .profile

Check the version of java and maven with the commands.

`java --version`

`mvn --version` 

Now you should see the proper version of Maven installed.

If you open a new terminal window and the installation seems ineffective: LOGOUT AND LOGIN!!!**

2 of 4
12

Following command helped me.

Remove current version:

sudo apt-get purge maven

Download the latest version:

wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
tar -xvf apache-maven-3.8.6-bin.tar.gz

Installation:

sudo cp -r apache-maven-3.8.6 /opt
export PATH=/opt/apache-maven-3.8.6/bin:$PATH
echo -e "\nPATH=\"/opt/apache-maven-3.8.6/bin:\$PATH\"" >> ~/.profile

Script

#!/bin/sh

version=version ] ; then echo "specify version" ; exit 1 ; fi

#Remove old maven
sudo apt-get purge maven -y

url="https://dlcdn.apache.org/maven/maven-3/${version}/binaries/apache-maven-${version}-bin.tar.gz"
echo $url
wget $url

sleep .4

tarFile="apache-maven-${version}-bin.tar.gz"
echo $tarFile
sudo tar -xvf $tarFile -C /opt/

export PATH=/opt/apache-maven-${version}/bin:$PATH
echo -e "\nPATH=\"/opt/apache-maven-${version}/bin:\$PATH\"" >> ~/.profile

Pass the 1st argument as the maven version. Example: ./install.sh 3.8.7

Note: Make sure Java is installed before following the above steps.

Discussions

How To Install Maven
Always appreciated, especially making it visible to new users. I personally use Maven Wrapper as well as mvnd (via sdkman), and other package managers are available, too. For example asdf. Anyway, maybe we can cut the JDK requirement in the future. ๐Ÿ˜‰ Have you heard of the plans? More on reddit.com
๐ŸŒ r/Maven
3
5
July 25, 2025
Just curious, why maven doesn't have an installer? like JDK? and why installers don't set the path automatically to system variables themselves?
Sdkman will do all of this for you. Love it so much! More on reddit.com
๐ŸŒ r/learnjava
15
31
June 25, 2021
โ€‹Help installing Maven clean install
So maven helps applications manage dependencies. What that error is telling you is that one of the dependencies defined in the application you're trying to install cannot be located in any of the provided repositories (org.onap.oparent:checkstyle:jar:1.2.2-SNAPSHOT). Step two of that wiki has instructions about merging a provided settings.xml file in the .m2 directory, which is going to give your maven instance other repositories to search in. I suspect you didn't correctly integrate these changes and your maven is unable to locate the necessary dependencies. More on reddit.com
๐ŸŒ r/javahelp
9
11
May 14, 2019
I can't even figure out how to install maven!

How do people learn how to do this stuff?

takes time. Your work place wants to see how you solve previously unencountered problems. You will be much faster on your second time. And on your 10th you know it blindly :)

what exactly do you want to do with the JSON? I assume it already exists and you just consume it? But then what? What language do you continue working in with or is it just showing the data in some way?

It looks like you want to do it web based https://api.jquery.com/jquery.get/ is actually all you need if you use jquery

  • blank html doc

  • add jquery

  • paste that get code and change url to what you have

  • console.log resulting data

but then what? What do you want to achieve? You should be able to see the JSON in raw format in your browser anyways if you just enter the URL manually

More on reddit.com
๐ŸŒ r/learnprogramming
13
0
June 17, 2016
๐ŸŒ
Apache Maven
maven.apache.org โ€บ download.cgi
Download Apache Maven โ€“ Maven
Maven is distributed in several formats for your convenience. Simply pick a ready-made binary distribution archive and follow the installation instructions.
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ install-maven-linux-ubuntu
Install Apache Maven on Ubuntu with JDK 17, SDKMAN, CI/CD Automation | DigitalOcean
August 26, 2025 - Hereโ€™s an example Dockerfile snippet to install Maven in a CI/CD environment: FROM ubuntu:22.04 RUN apt-get update && apt-get install -y openjdk-17-jdk maven WORKDIR /app COPY .
๐ŸŒ
GitHub
gist.github.com โ€บ wuriyanto48 โ€บ 697afdb7ddc5ed0121254cb3de687b2f
Install Maven on Ubuntu ยท GitHub
Visit Maven download page https://maven.apache.org/download.cgi, and choose the latest version.
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ sysadmin โ€บ how to install maven on ubuntu
How to Install Maven on Ubuntu
December 19, 2025 - Install Maven on Ubuntu by following this simple tutorial. The tutorial includes steps for installing via APT and the official Maven webiste.
Find elsewhere
๐ŸŒ
Medium
vanessuniq.medium.com โ€บ installing-the-latest-apache-maven-on-ubuntu-e71fe47aa204
Installing The Latest Apache Maven on Ubuntu | by Vanessa Fotso | Medium
February 19, 2023 - Unfortunately, I could not upgrade to the latest maven version (3.9.0 at the time) using the aptpackage manager on Ubuntu. Generally, the easiest way to install anything on Ubuntu is via the apt package manager.
๐ŸŒ
Serverspace
serverspace.io โ€บ support โ€บ help โ€บ how-to-install-maven-on-ubuntu
How to Install Apache Maven on Ubuntu 20.04 (Step-by-Step Guide)
July 24, 2025 - How do I install Maven manually on Ubuntu 20.04? Download the binary archive from the official Maven site. Extract the archive to /opt/maven or another directory. Set MAVEN_HOME and update PATH in your .bashrc or .zshrc.
๐ŸŒ
LinuxCapable
linuxcapable.com โ€บ home โ€บ ubuntu โ€บ how to install apache maven on ubuntu 26.04, 24.04 and 22.04
How to Install Apache Maven on Ubuntu 26.04, 24.04 and 22.04 - LinuxCapable
April 28, 2026 - Install Apache Maven on Ubuntu 26.04, 24.04 and 22.04. Includes version comparison, environment setup, testing, and removal steps.
๐ŸŒ
ComputingForGeeks
computingforgeeks.com โ€บ home โ€บ install apache maven on ubuntu 22.04|20.04|18.04
Install Apache Maven on Ubuntu 22.04|20.04|18.04 [Guide]
March 22, 2026 - Learn how to apache Maven on Ubuntu 22.04|20.04|18.04. Complete guide with commands, configuration, and troubleshooting tips.
๐ŸŒ
Apache Maven
maven.apache.org
Welcome to Apache Maven โ€“ Maven
This includes an in-depth description of what Maven is and a list of some of its main features.
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ maven โ€บ how to install maven on windows, linux, and mac
How to Install Maven on Windows, Linux, and Mac | Baeldung
May 11, 2024 - To install Maven on the Linux operating system, we download the latest version from the Apache Maven site and select the Maven binary tar.gz file, for example, apache-maven-3.8.4-bin.tar.gz.
๐ŸŒ
Shapehost
shape.host โ€บ home โ€บ resources โ€บ how to install maven on ubuntu 24.04
How to Install Maven on Ubuntu 24.04 - Shapehost
December 10, 2024 - Learn how to install Apache Maven on Ubuntu 24.04 with this easy guide. Set up Maven for Java projects and streamline your build process.
๐ŸŒ
Mkyong
mkyong.com โ€บ home โ€บ maven โ€บ how to install maven on ubuntu
How to install Maven on Ubuntu - Mkyong.com
November 9, 2018 - In this tutorial, we will show you how to install Apache Maven on Ubuntu.
๐ŸŒ
Linuxize
linuxize.com โ€บ home โ€บ maven โ€บ how to install apache maven on ubuntu 18.04
How to Install Apache Maven on Ubuntu 18.04 | Linuxize
December 30, 2019 - In this tutorial, we will show you two different ways to install Apache Maven on Ubuntu 18.04.
๐ŸŒ
Simplilearn
simplilearn.com โ€บ home โ€บ resources โ€บ devops โ€บ maven tutorial for beginners โ€บ how to install maven on windows and ubuntu
How to Install Maven on Windows and Ubuntu?
April 27, 2025 - This article explains how to install maven on windows and ubuntu operating system. So, read on to learn the complete steps of installation.
Address ย  5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
๐ŸŒ
Thedevjournal
thedevjournal.blog โ€บ mastering-series โ€บ apache-maven โ€บ 01-getting-started โ€บ 02-installation-linux
Installing Maven - Linux :: The Developer Journal
April 12, 2026 - This command is part of coreutils package and if you donโ€™t have install, you can install it with your package manager. Here is a list of installation commands for installing coreutils on your Linux distribution. -> sha512sum apache-maven-3.9.9-bin.zip 8beac8d11ef208f1e2a8...
๐ŸŒ
RoseHosting
rosehosting.com โ€บ home โ€บ how to install apache maven on ubuntu 20.04
How to Install Apache Maven on Ubuntu 20.04
October 3, 2022 - Apache Maven 3.6.3 (cecedd3430... arch: "amd64", family: "unix" You can also install the Apache Maven from the Ubuntu 20.04 default APT repository....