How to configure Maven

Step 1: System Requirements

Maven system requirements

Check if java installed on your machine.

From Command prompt, please enter "java -version" which will display the Java version installed in your local machine.

Step 2: You need to Download the stable version of Maven from Click here to download Maven latest version
For windows system make sure you download Maven (Version) (Binary zip)
For Linux Machines, make sure you download Maven (Version) (Binary tar.gz)

Maven Downloads

Step 3: Extract the File, and place it in C: drive.
Rename the file from Apache Maven (version) to simple Maven for just usability.
C:\Program Files\Maven

Step 4: Once we have downloaded, all that we are now left to do before start using MAVEN is set a couple of environment variables. To do that, right click Computer >> Properties >> Advanced >> Environment Variables.

Second variable that we need to set up is the PATH variable, the reason we do this is that you can trigger maven executable command from anywhere in your command prompt and it will point to the MAVEN executable which is in the BIN folder

Properties. [Note: You should have the admin access to the system]
Set Environment Variables

First you need to set the new variable as "MAVEN_HOME" and provide the path where the Maven is stored in C drive (as above mentioned C:\Program Files\Maven)

Add Environment Variable

Next we need to add the bin folder to the Path.

Select the Path in System variables and Click on Edit.

Add the path of the Maven Build Folder as %MAVEN_HOME%/bin or simply as (C:\Program Files\Maven\bin).
Edit path Variable

Click on OK and Apply the Environment Variables.

Step 5: There we go, we are set and ready to hit MAVEN commands. So, firstly lets test to see if MAVEN is working fine. A simple MAVEN command is mvn --version.

Open Command Prompt and enter the command as mvn -version - It should display the version number as in the below screen shot.

maven version

Build Tools: 


sir we need to build selenium application in maven by using eclipse. how can i build and how can write scripts by using maven.

Hi, Thanks for writing this tutorials, I am going through all the tutorials from long time and its easy to understand, can u please add jenkins tutorials as well

hii ,
I downloaded Maven
Done the steps but in command prompt i got error:java_home not found in your environment

Please suggest me what to do...

check u r Environment path setup
in commend prompt you will give the same name that are in environment name you are enter the java build path,

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.