Skip to content

Instantly share code, notes, and snippets.

@ervinb
Created July 1, 2015 11:25
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save ervinb/34203f0cc54c1e7f982b to your computer and use it in GitHub Desktop.
Save ervinb/34203f0cc54c1e7f982b to your computer and use it in GitHub Desktop.
Install Maven 3.3.3 on Ubuntu 14.04
#!/bin/sh
sudo apt-get purge -y maven
if ! [ -e .semaphore-cache/apache-maven-3.3.3-bin.tar.gz ]; then (cd .semaphore-cache; curl -OL http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz); fi
sudo tar -zxf .semaphore-cache/apache-maven-3.3.3-bin.tar.gz -C /usr/local/
sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn
echo "Maven is on version `mvn -v`"
@matef
Copy link

matef commented Sep 6, 2015

you need to add these 2 lines

echo "export M2_HOME=/usr/local/apache-maven-3.3.3" >> ~/.profile
. ~/.profile

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