I recently installed zsh and oh-my-zsh in my Mac. Now when I try to run a maven command from the terminal, I am getting the following error.
$ mvn install zs
Try below steps:
Open terminal and run command vi ~/.zshrc
vi ~/.zshrc
Add below lines in file:
export M2_HOME=/Users//Downloads/apache-maven-3.6.3 export PATH=${M2_HOME}/bin:${PATH} export PATH
Save file successfully
Open another terminal instance & run command mvn -version
mvn -version
It should work!