Upgrading Maven on Mac
To upgrade to the latest version (if you have one already installed but need to update the version) do the following:
1. brew update
2. brew unlink maven
3. brew install maven
if you then execute the mvn --version
command you should see that your version of maven has been upgraded.
EDIT:
If you have an issue with the update (command 1) that goes along the lines of error: The following untracked working tree files would be overwritten by merge:
Library/Formula/...
try this answer from another issue
You created a symbolic link from your Downloads directory with a directory that may not exist anymore (or with an incorrect path). The directory /usr/bin/mvn obviously exists but the link is incorrect to the target which leads to the "No such file or directory" error when typing mvm --version
.
Go through the tutorial again (which seems ok) but if you fail you could always try using Homebrew with the following commands :
brew update
brew install maven
if you installed maven in your mac, i use the next command...
>brew upgrade maven
screenshot