Maven is a build tool that automates everything related to building a software project, including:

  • Compiling all the source code
  • Generating the documentation from the source code
  • Packaging the complied code into a JAR or WAR archive file
  • Installing the packaged archives files on a server

To install Maven:

  1. Go to Maven’s download page:
  2. Click on the
  3. Once the download is finished, go to the downloaded directory and extract the .zip file into a convenient directory of your choice.
  4. Update the System Path variable with a new environment variable called M2_HOME that points to the directory that you put the maven files.
  5. Create one more environment variable, called MAVEN, with the value %MAVEN_HOME%\bin.
  6. Finally append the MAVEN variable to the PATH environment variable as well.

To verify the installation run the mvn -version command in the command console.