Wednesday, August 14, 2013

How to Install and Configure Maven on Windows

Maven is a build automation tool used primarily for Java projects. Maven serves a similar purpose to the Apache Ant tool, but it is based on different concepts and works in a different manner.

I don't want to get into details about Maven here. Let's focus :-)

I will share my knowledge about installing and configuring Maven on Windows platform.

It is not required to install Apache Maven on Windows as a service component, we can just download the Maven’s zip file, extract it and configure the Windows environment path variable. That's all we need. Very easy, but very powerful + helpful.

So let's get started.

Tools needed:
  1. JDK
  2. Maven :-)
  3. Windows :-)
1. Verifying Java and JDK (JAVA_HOME):
Make sure JDK is installed, and “JAVA_HOME” variable is added in Windows environment variable which should point to the JDK folder. Below is the screenshot:




































2. Download Maven:
You can download Maven from Apache Maven's official website. Select the latest version and download the zip file. Once the download is finished, extract the downloaded Zip file.



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


































4. Configure Path:
Once MAVEN_HOME is set, add the MAVEN to Path. Append “Maven bin folder” path, so that you can run the Maven’s command everywhere


































5. Verify MAVEN Installation:
Open command prompt in Windows and verify by typing "mvn -version". The result should be:





















Done. You configured Maven correctly. Enjoy coding ;-)

0 comments:

Post a Comment