Install Maven in Zsh on Mac

Mar 4, 2018 · 1 min read · 66 Words · -Views -Comments

Maven is a build tool for Java development. This post shows how to install it in a Zsh environment.

Download Maven

Unzip it and place it in a directory such as /Library/apache-maven-3.5.2.

Open terminal (e.g. iTerm2) and edit zshrc

$ vi ~/.zshrc

Append the following at the end of the file:

export M2_HOME=/Library/apache-maven-3.5.2
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

Exit the editor, close the terminal, and restart it.

Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover