Binary releases of Maven can be downloaded from the Maven website.
The binary comes as a zip archive or as a tar.gz archive. After downloading it, the instructions from the install page can be followed:
JAVA_HOMEenvironment variable is set and points to your JDK installation (not JRE). For example, on a Windows machine, this installation folder can correspond
bindirectory of the created directory (named
apache-maven-3.3.9for Maven 3.3.9) to the
PATHenvironment variable. (Reference to change it on Windows).
mvn -versionon the command line.
There is no need to set the
MAVEN_HOME environment variable.