6

I'd like to know how to install maven(apache-maven-3.1.1) to mac using the terminal application without using brew.

If possible please explain in steps with commands.

without using brew!!

Charana STR
  • 69
  • 1
  • 2
  • 9

2 Answers2

27

If you have homebrew installed, it should be as simple as

brew install maven

If you don't have homebrew installed (and you should have it installed) the installation instructions are here

zchrykng
  • 1,066
  • 1
  • 10
  • 20
2

You can download the apache-maven-3.1.1-bin-tar.gz copy that to /usr/share/java via

sudo cp apache-maven-3.1.1-bin.tar.gz /usr/share/java

and unpack it via:

cd /usr/share/java
sudo tar -zxf apache-maven-3.1.1-bin.tar.gz 
sudo rm apache-mave-3.1.1-bin.tar.gz

and finally add something similiar:

PATH=/usr/share/maven/bin:$PATH

in your .bash_profile.

That's it. But i would recommend to use a more up-to-date version 3.2.1 instead.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235