RSSAll Entries Tagged With: "setup"

How to set up Maven Build Tool in Windows ?

Hello I’m back with a new article on setting up Maven Tool within your MS Windows machine.

Maven is a build automation tool used primarily for Java projects which describes how software is built and it describes its dependencies.

1. Check if Maven is already installed on your system.

It would be better if we confirm that Maven is not installed on your system. :)

Goto MS DOS and put mvn –version command.

If you see the below screen with error message : ‘mvn’ is not recognized as an internal or external command, operable program or batch file.

0

2. Download and Unzip Maven

Maven is an Apache Product so you would need to download it from – http://maven.apache.org/

1

On clicking the above Download Link you would be redirected to the download page.

2

Make sure you download the Binary Zip for MS Windows and extract it to a folder as you need. I created a below folder structure; if interested you can also follow it.

3

ie; the path is : D:\Program Files\Apache Foundation\apache-maven-3.1.1

3. Set Environment Variables.

The below screen can be obtained from My Computer –> Properties –> Advanced System Settings.

4       5

Create a User Variable – M2_HOME with value – D:\Program Files\Apache Foundation\apache-maven-3.1.1

Append the PATH under System Variable with a semi colon – D:\Program Files\Apache Foundation\apache-maven-3.1.1\bin

You can see in the below image that how I added value for PATH. You should put a semi colon to the existing value and paste the above path.

6

Once the Environment Variables are set. You can validate by putting :

> mvn –version command under DOS.

7

You are DONE with Maven set up !