How to install maven to mac using terminal without

2019-05-01 11:21发布

This question already has an answer here:

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!!

2条回答
孤傲高冷的网名
2楼-- · 2019-05-01 11:24

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

查看更多
时光不老,我们不散
3楼-- · 2019-05-01 11:50

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.

查看更多
登录 后发表回答