Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewhartman/2ac32feff2ba88cdb5de6449f0516cf9 to your computer and use it in GitHub Desktop.
Save matthewhartman/2ac32feff2ba88cdb5de6449f0516cf9 to your computer and use it in GitHub Desktop.
Install Maven on Linux (Debian)

Install Maven On Linux (Debian)

Download maven binary https://maven.apache.org/download.cgi

Extract maven

sudo tar zxvf apache-maven-*.tar.gz -C /usr/local/

Tell the system that there's a new Maven version available:

sudo update-alternatives --install "/usr/bin/mvn" "mvn" "/usr/local/apache-maven_version/bin/mvn" 1

Set the new Maven as the default:

sudo update-alternatives --set mvn /usr/local/apache-maven_version/bin/mvn

Verify Maven is working:

mvn -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment