Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To install maven
- # Change $version to $alphaVersion to download the Alpha version of maven
- version=$(curl -s https://dlcdn.apache.org/maven/maven-3/ | grep -oP "\d+\.\d+\.\d+" | sort -rV | head -n 1)
- generation=3
- # alphaVersion=$(curl -s https://dlcdn.apache.org/maven/maven-4/ | grep -oP "\d+\.\d+\.\d+\-alpha-\d+" | sort -rV | head -n 1)
- # generation=4
- wget https://dlcdn.apache.org/maven/maven-$generation/$version/binaries/apache-maven-$version-bin.zip
- unzip apache-maven-$version-bin.zip
- mv apache-maven-$version /usr/local/mvn
- ln -s /usr/local/mvn/bin/mvn /usr/bin
- ln -s /usr/local/mvn/bin/mvnyjp /usr/bin
- ln -s /usr/local/mvn/bin/mvnDebug /usr/bin
- rm -r apache-maven-$version-bin.zip
- // To uninstall maven
- rm -r /usr/local/mvn
- rm -r /usr/bin/mvn
- rm -r /usr/bin/mvnyjp
- rm -r /usr/bin/mvnDebug
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement