Categories: Maven

How to Install Maven in Windows

In this tutorial we will see that how to install maven to the window platform. Apache Maven is not require to install on Windows as a service component, you just need to download the Maven’s zip file, extract it and configure the Windows environment path variable.

Maven is a Java tool, so you must have Java installed in order to proceed.

Tools Used :

  1. JDK 1.6
  2. Maven 3.0.5
  3. Windows 7

Step 1:  First, download Maven and follow the installation instructions. After that, type the following in a terminal or in a command prompt:

Step 2: JDK and JAVA_HOME
Make sure JDK is installed, and “JAVA_HOME” variable is added in Windows environment variable, and point to the JDK folder.


Step 3: Extract downloaded apache-maven-3.0.5-bin.zip

Extract the downloaded zip file. In this case, we extracted to F: driver and renamed the folder, e.g F:maven

Step 4: Add MAVEN_HOME
Add a new MAVEN_HOME variable to the Windows environment, and point it to your Maven folder.

Step 5: Add PATH
Update PATH variable, append “Maven bin folder” path, so that you can run the Maven’s command everywhere.

Step 6: Verification
Done, to verify it, in command prompt, type “mvn –version”.

C:UsersDinesh>mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:
28+0530)
Maven home: F:mavenbin..
Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
Java home: C:Program Files (x86)Javajdk1.6.0_23jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
C:UsersDinesh>

If you see similar message, means your Apache Maven is installed successfully on Windows.

Next
Dinesh Rajput

Dinesh Rajput is the chief editor of a website Dineshonjava, a technical blog dedicated to the Spring and Java technologies. It has a series of articles related to Java technologies. Dinesh has been a Spring enthusiast since 2008 and is a Pivotal Certified Spring Professional, an author of a book Spring 5 Design Pattern, and a blogger. He has more than 10 years of experience with different aspects of Spring and Java design and development. His core expertise lies in the latest version of Spring Framework, Spring Boot, Spring Security, creating REST APIs, Microservice Architecture, Reactive Pattern, Spring AOP, Design Patterns, Struts, Hibernate, Web Services, Spring Batch, Cassandra, MongoDB, and Web Application Design and Architecture. He is currently working as a technology manager at a leading product and web development company. He worked as a developer and tech lead at the Bennett, Coleman & Co. Ltd and was the first developer in his previous company, Paytm. Dinesh is passionate about the latest Java technologies and loves to write technical blogs related to it. He is a very active member of the Java and Spring community on different forums. When it comes to the Spring Framework and Java, Dinesh tops the list!

Share
Published by
Dinesh Rajput

Recent Posts

Strategy Design Patterns using Lambda

Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…

2 years ago

Decorator Pattern using Lambda

Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…

2 years ago

Delegating pattern using lambda

Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…

2 years ago

Spring Vs Django- Know The Difference Between The Two

Technology has emerged a lot in the last decade, and now we have artificial intelligence;…

2 years ago

TOP 20 MongoDB INTERVIEW QUESTIONS 2022

Managing a database is becoming increasingly complex now due to the vast amount of data…

2 years ago

Scheduler @Scheduled Annotation Spring Boot

Overview In this article, we will explore Spring Scheduler how we could use it by…

3 years ago