Unfortunately, the Ubuntu repos are a bit slow. The repos only have Maven2. Now, let's get to installing Maven3.
1. Install the Nate Carlson's PPA for Maven3
2. Open a terminal console and type in: sudo apt-get update
3. After update finishes, type in: apt-get install Maven3
You now have Maven3 installed but you can't run it from the terminal because you didn't set the paths. If you try to type: mvn --version; That should fail. To fix this you have to make a symbolic link from where Maven3 is installed to where it can be run it "globally" from the terminal.
$ sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn
You just created a symbolic link in /usr/bin/mvn. The mvn command now should work in your terminal.
Update (3/29/2013):
Caution: command "sudo add-apt-repository ppa:natecarlson/maven3" did not work on my Ubuntu and and had to run "sudo add-apt-repository -rm ppa:natecarlson/maven3" to get my apt-get to work again. ~AmirHD
See this Stackoverflow thread.
sudo apt-get install maven3 //tdert ka
ReplyDeleteThis is not working for ubuntu 12.10. I got the error Unable to locate package Maven3 or Unable to locate package maven3
ReplyDeleteDid you to install Nate Carlson's PPA first before you ran apt-get install maven3?
DeleteThis comment has been removed by the author.
ReplyDeleteThis approach doesn't seem to be working always.
ReplyDeleteSee http://stackoverflow.com/questions/15630055/how-to-install-maven-3-on-ubuntu-12-10-by-using-apt-get/ to find a way around.
Thanks. I will update the entry with the new information.
Deletethanks.. it helps me :D
ReplyDelete