
Java version: 1.7. Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.3.3 M2_HOME=C:\Program Files\Apache\maven\apache-maven-3.5.0Ĥ) Now append M2 variable to System Path.Īppend the string %M2% to the end of the system variable, Path.ĥ) Open Command Console and run this command c:\> mvn -version In Any system following are the 3 basic steps to setup Maven. Make sure Java JDK installation 1.7 or higher OR GraalVM for Java 8 or higher installed in your system and already set JAVAHOME system path. Add M2_HOME, M2, MAVEN_OPTS to environment variables. This is a step by step guide on how to install Maven on Windows 10 Operating Systems manually and from Command line. Unzip it to the folder you want to install Maven.Īssume you unzip to this folder – C:\Program Files\Apache\mavenģ) Set the environment variables using system properties. When you tried to setup maven in your Windows OS by following above steps, you came across any issue? comment below.1) Make sure JDK is installed, and “JAVA_HOME” variable is added as Windows environment variable.ġ) Download the Maven zip file, for example : apache-maven-3.5.0-bin.zip. Now, you can create a job with the Maven project. Then, click on the ' Save ' button at the end of the screen. And now, to configure Maven, click on 'Add Maven' button in the Maven section, give any Name and MAVENHOME path or check to install automatically checkbox. Also, add the maven bin folder to the Path variable. Now, use the below image to create the M2HOME and MAVENHOME variables. I have extracted it to C:\Program Files\apache-maven-3.6.3. First of all, extract the downloaded maven zip file to any folder of your choice.

In this guide we have seen how to install Maven on Windows 10 OS. Give a Name and JAVAHOME path, or check on install automatically checkbox. 2.2) Setting up Maven Environment Variables M2HOME, MAVENHOME, Path.


Java version: 11.0.7, vendor: GraalVM Community, runtime: Z:\D\graalvm\graalvm-ce-java11-20.1.0ĭefault locale: en_US, platform encoding: Cp1252 Maven home: Z:\D\maven\apache-maven-3.6.3\bin\. To test maven installation successful, just try mvn -version from command prompt, you will get similar following results. $ setx /M PATH "%MAVEN_HOME%\bin %PATH%" 5. Update %MAVEN_HOME%\bin from command line.
