How to Install Maven latest version on Ubuntu Server Example

install-maven-on-ubuntu-18.10-vultr-vps-hosting--feature-image

In the tutorial, we guide how to install Maven in Ubuntu Server.

Related post:
How to install Java in Ubuntu Remote Server – Vutr Hosting VPS Example

Check Java Installation

Firstly, check Java:

install-maven-on-ubuntu-18.10-vultr-vps-hosting--check-java

Related post if Java is NOT installed ->

How to install Java in Ubuntu Remote Server – Vutr Hosting VPS Example

Install Maven with APT

Updating the package index:

sudo apt update

Install Maven by cmd:

sudo apt install maven

Verify the Maven installation by cmd:

mvn -version

install-maven-on-ubuntu-18.10-vultr-vps-hosting--check-maven-installation

Install Maven Latest Version

The lastest version of Maven when creating the post is 3.6.0. But the Maven package index by APT is just 3.5.4.

So for the lastest version of Maven, we need install Maven from Downloading Apache Maven

– Download Apache Maven ->

– Extract the archive in the /opt directory ->

– Create a symbolic link maven which will point to the Maven installation directory:

-> For upgrade Maven installation, just simply unpack the newer version and change the symlink to point to the latest version.

– Setup Maven Environment Variables:

Export M2_HOME, MAVEN_HOME & PATH ->

– Now verification: mvn -version

install-maven-on-ubuntu-18.10-vultr-vps-hosting--check-maven-installation-latest-ver

By grokonez | December 3, 2018.



Related Posts


Got Something To Say:

Your email address will not be published. Required fields are marked *

*