Maven Version Manager

A simpler way to invoke maven and manage the version of maven within your team.


Set the Maven version with mvn_version in in your project directory:

$ cat

Alternatively, set properties in ${HOME}/ to apply to all projects for your user.

Advanced Usage

Properties valid in Command line argument equivalent Description
mvn_version --mvn-version sets the version of Maven to use. The default is the newest version of Maven as of the release of mvnvm in use.
user_uri --apache-mirror sets a specific Apache mirror from which to retrieve Maven
central_uri --central-mirror sets a specific URI to use in place of Maven Central
local_dir none sets the directory where mvnvm stores Maven installations. The default is ${HOME}/.mvnvm.
mvn_opts none sets the content of the MAVEN_OPTS environment variable when executing mvn

Other command line arguments:

  • --download-only - downloads Maven but does not execute it
  • --home - prints the M2_HOME directory and exits
  • --mvnvm-version - shows the mvnvm version and exits
  • -d - enables mvnvm debug

All other command line arguments are passed to mvn.