Skip to content

Instantly share code, notes, and snippets.

@OndraZizka
Last active March 20, 2023 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save OndraZizka/6a094ae8e8ac4032af26aaf0c249d212 to your computer and use it in GitHub Desktop.
Save OndraZizka/6a094ae8e8ac4032af26aaf0c249d212 to your computer and use it in GitHub Desktop.
Linux: install Maven 3.8.6
#!/bin/bash
## Because Ubuntu 22.10 still has Maven 3.6.3, this fixes it:
wget -q https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz -P /tmp
mkdir ~/sw/
tar xf /tmp/apache-maven-*.tar.gz -C ~/sw/
rm /tmp/apache-maven-*.tar.gz
mv /sw/apache-maven-* -C ~/sw/maven
echo 'MAVEN_HOME=~/sw/maven' >> ~/.bashrc
echo 'M2_HOME=$MAVEN_HOME' >> ~/.bashrc
echo 'PATH=$MAVEN_HOME/bin:${PATH}' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment