java - How to install Maven 3 on Ubuntu 15.10/15.04/14.10/14.04 LTS/13.10/13.04/12.10/12.04 by using apt-get? -


try:

sudo apt-get install maven 

if works ignore rest of post.

intro

i started setting ubuntu 12.10 on april 2013 , normal sudo apt-get install maven not working maven 3 then.

the manual installation in post useful if dig in deeper ubuntu kernel in regards apt-get , finds list of applications available installation on ubuntu . can potentially useful more recent releases of ubuntu ubuntu 15.04, etc. if face same problem did ubuntu 12.10.

automatic installation via apt-get:

checkout manual installation if current ubuntu can not install maven via common 'apt-get install maven'.

sudo apt-get update sudo apt-get install maven 

make sure remove maven 2 if ubuntu not fresh or if using maven 2 before:

sudo apt-get remove maven2 

manual installation via apt-get adding maven 3 repository (ubuntu 14.04 check out update 1):

this can useful if ubuntu apt-get repositories list not date.

maven 3 required set system , turns out of documents out there referring how install maven ubuntu version 12.04 or before. best document found was:

killertilapia's blog

the whole process came follows:

  1. sudo -h gedit /etc/apt/sources.list
  2. add following line sources.list file:

    deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main

    deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main

  3. sudo apt-get update && sudo apt-get install maven3

  4. sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn

caution 1: command "sudo apt-add-repository ppa:natecarlson/maven3" did not work on ubuntu , had run sudo apt-add-repository -rm ppa:natecarlson/maven3 apt-get work again.

caution 2: david, need remove existing symbolic link previous versions of maven before running step 4.

os x installation

i decided add os x installation in case use multiple environments dev: see source stackoverflow thread more details.

install homebrew equavalent of apt-get, install maven using:

brew install maven 

update 1: installation ubunutu 14.04

haven't tried myself confident should work without security warnings:

sudo apt-get purge maven maven2 maven3 sudo apt-add-repository ppa:andrei-pozolotin/maven3 sudo apt-get update sudo apt-get install maven3 

note: source here, many , +1s @rendybjunior, @dominic_bartl, , @funthomas424242

here's easier way:

sudo apt-get install maven 

more details here.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -