Skip to content

Instantly share code, notes, and snippets.

@strongant
Created June 28, 2022 15:45
Show Gist options
  • Save strongant/ac296fe8ddcf107d3e2b16445085b491 to your computer and use it in GitHub Desktop.
Save strongant/ac296fe8ddcf107d3e2b16445085b491 to your computer and use it in GitHub Desktop.
Maven 3.5.2 Linux Installation Script
#//INSTRUCTIONS TO INSTALL MAVEN ON LINUX
#//Downloads install file from Maven Distro
wget http://www-us.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar xzf apache-maven-3.5.2-bin.tar.gz
#//Enables script to write to directory /usr/local so that it can make the directory /maven
sudo chmod 777 /usr/local
sudo mkdir /usr/local/maven
#//Moves the file into the directory maven
sudo mv apache-maven-3.5.2/ /usr/local/maven/
#//Sets the alternatives in case there are multiple versions
sudo alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.5.2/bin/mvn 1
sudo alternatives --config mvn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment