Saturday, September 23, 2017
Home > Windows > Seven easy steps to install Maven in Windows 7

Seven easy steps to install Maven in Windows 7

Seven easy steps to install Maven in Windows 7

Before we configure Apache Maven to work in Windows environment, we need to install required Java(JDK) first.
If you are having Windows 64 bit then go ahead and download Java (JDK) 64 bit version,

Step-1 Download JAVA(JDK)

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Download Windows x64 195.51 MB   jdk-8u121-windows-x64.exe

Step-2 After you install Java successfully, Download Apache Maven zip file from this url
https://archive.apache.org/dist/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.zip

Note: JDK 1.6 or above requires to install Maven 3.X, while Maven 3.X requires JDK 1.5 or above

Step-3 Lets add “JAVA_HOME” in Windows environment System variable as shown in Image-1
C:\Program Files\Java\jdk1.8.0_92

Java Home System Variable
Image-1

Step-4 we have already downloaded the Apache Maven, lets unzip it and keep it here in this location. we can extract it anywhere but need to know the path which we will add it in path as shown in Image-2

Seven easy steps to install Maven in Windows 7
Image-2

D:\Program Files\Apache\maven

Note: We need to extract the folders in this location only. No installation required.

Step-5 Next Add M2_HOME and MAVEN_HOME as System variables
Need to Add both M2_HOME and MAVEN_HOME variables in the Windows environment, also locate it to maven extracted folder as shown in Image-3

Seven easy steps to install Maven in Windows 7
Image-3

Step-6 Add to PATH Variable
Add maven bin folder location(D:\Program Files\Apache\maven\bin) in PATH variable so that you can run maven command from any location.
as shown in Image-4

Seven easy steps to install Maven in Windows 7
Image-4

Step-7 we are almost done setting up Apache Maven
Lets check it, open command prompt as run as administrator to avoid issues and type maven -version
It should result out something like this as shown in Image-5
if you are getting “‘maven’ is not recognized as an internal or external command, operable program or batch file”
then try mvn -version. Hope that will show the result.

Seven easy steps to install Maven in Windows
Image-5

You can follow the above mentioned steps in Windows 8 or Windows 10 to install Apache Maven.

You may also like :solve phpinfo() shows version 5.5.9 but in cli php -v shows version 7.1

Durga Charan Ojha
I am a proud Indian, proud father, a blogger, Being in a profession as System administrator, my passion is troubleshooting computer issues, I do like sharing solutions through blogging making videos of solving issues.
https://lifeonnetwork.com/

Leave a Reply

Your email address will not be published. Required fields are marked *