macosmaven-3

Upgrading Maven on Mac


Tried to upgrade maven on my Macbook.

I've been following this tutorial.

I am a little confused. I get a file exists when I check for symlink for mvn to my bin folder and it exists but when I run mvn --version, it throws a No such file or directory error.

Image attached below enter image description here

How does a file exist and not exist?


Solution

  • 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