Install Maven3 on Debian

Optional: Create Java user

wget http://apache.mivzakim.net/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz
tar -zxvf apache-maven-3.2.3-bin.tar.gz
sudo mv apache-maven-3.2.3/ /usr/local/apache-maven-3.2.3
sudo ln -s /usr/local/apache-maven-3.2.3 /usr/local/apache-maven
 
#OPTIONAL - See http://wiki.korotkin.co.il/howto/create_java_user
sudo chown -R java.java /usr/local/apache-maven*
sudo chmod -R 775 /usr/local/apache-maven*

edit ~/.bashrc

export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export M3_HOME=/usr/local/apache-maven
export M3=$M3_HOME/bin
export PATH=$JAVA_HOME:$JAVA_HOME/bin:$M3:$PATH