Skip to content
Advertisement

Switch maven version – mvn command does not get bound

I’m trying to switch maven from 2 to 3 (on Linux) using:

sudo update-alternatives --set mvn /path/to/maven3/bin/mvn

Anyway mvn -v still gives version 2, so I always have to execute /path/to/maven3/bin/mvn to use maven. How can I rebind the mvn command to the appropriate maven path?

Advertisement

Answer

which mvn

And then recreate symbolic link to point on new Maven version. And verify than environment variable MAVEN_HOME points to the right directory.

Advertisement