Apache Maven Installation or Setup


Example

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:

  • Ensure the JAVA_HOME environment variable is set and points to your JDK installation (not JRE). For example, on a Windows machine, this installation folder can correspond C:\Program Files\Java\jdk1.8.0_51.
  • Extract the distribution archive in the directory of your choice.
  • Add the bin directory of the created directory (named apache-maven-3.3.9 for Maven 3.3.9) to the PATH environment variable. (Reference to change it on Windows).
  • Verify that the set-up is correct by running mvn -version on the command line.

There is no need to set the M2_HOME or MAVEN_HOME environment variable.