Install and Setup Maven

Prerequisite for Maven :

  • Make sure JDK is installed
  • Make sure JAVA_HOME path variable is set

How to install Maven? (Windows)

  • Download the zip from Apache web site
  • Extract it into a directory
  • Set M2_HOME and MAVEN_HOME for the install directory
  • Set the bin folder of installed directory in path variable

Follow the steps below to install on ubuntu :

User/System variable for Maven

  • Add both M2_HOME and MAVEN_HOME variables in the environment variable and point it to the maven directory.

Check maven version with below command :

mvn -version

Leave a Comment