In-order to run Maven we must have JDK installed on to your system. In order to avoid compatibility problem we requested you to install latest Java and Maven.
1. Visit the below link and follow step no. 2 to install and configure JDK onto your system.
https://realprathap.wixsite.com/mysite/aricles/selenium-3-via-java/2-setting-up-the-environments
2. Now to install Maven visit the link to download maven package from their official site
https://maven.apache.org/download.cgi
Now extract the zip (Binary zip archive) that we downloaded and place on your preferred directory. In order for our system to understand and execute maven commands we need to set it to system's environment variable. Copy the directory path where the maven is located
Now open command prompt (with admin access) and enter the below command
rundll32 sysdm.cpl,EditEnvironmentVariables
Click the New button to add new environment variable named MAVEN_HOME and paste copied maven in it. Finally apply and save it.
We can check if maven is successfully installed on to your system with below 2 steps,
I. Checking up the envr variable. Type below command in cmd,
echo %MAVEN_HOME%
II. Checking Maven version,
mvn -version