Not able to install Maven in Mac OS

Tags: , ,



Facing some issue while installing Maven.
I have set the path in my Bash profile. Still “mvn -version” command doesn’t work.

Downloaded latest version of maven:
enter image description here

Added it to my Bash profile:

enter image description here

java -version works.
But mvn -version doesn’t.

enter image description here

What am I missing here???

Answer

The MacOS shell has changed from bash to zsh.

export will most likely show that your configuration settings wasn’t read as zsh uses different configuration files than bash.

Investigate man zsh to understand the details. You will most likely need to move your settings to ~/.zshenv. Again use export in a fresh shell to see that your settings are active.



Source: stackoverflow