Skip to content

Instantly share code, notes, and snippets.

@dhirajforyou
Created April 15, 2016 02:10
Show Gist options
  • Save dhirajforyou/47bb423415e65f13313bbf7d35a19cdd to your computer and use it in GitHub Desktop.
Save dhirajforyou/47bb423415e65f13313bbf7d35a19cdd to your computer and use it in GitHub Desktop.
#Get maven
sudo apt-get install maven
#Check version
mvn -v
#Get source
git clone https://github.com/apache/maven.git ~/Documents
cd ~/Documents/maven
# create new maven snapshot
mvn install
# At last it gives the maven snapshot location, ex. ~/.m2/repository/org/apache/maven/apache-maven
cd ~/.m2/repository/org/apache/maven/apache-maven/3.4.0-SNAPSHOT
ls apache-maven-3.4.0-SNAPSHOT-bin.tar.gz
tar xzvf apache-maven-3.4.0-SNAPSHOT-bin.tar.gz
sudo cp -R apache-maven-3.4.0-SNAPSHOT /usr/local
sudp ln -s /usr/local/apache-maven-3.4.0-SNAPSHOT/bin/mvn /usr/bin/mvn
# In case soft link exists use force flag -f.
mvn -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment