Skip to main content

How To Install Maven In Windows 7 64-bit

In today's programming culture it's essential to know some more stuffs apart from the language you code with. I learned the importance of this insight as I was flipping through the book 'Well Grounded Java Developer' . I've come across the title of this book several times only to overlook it meaning  in depth, murmuring 'Ha! another book for java newbie'. But it turned out that I was totally wrong and it taught me a lot about programming (including Java) and other things like test drivent development, build and continuous integration (maven) etc. All these were the buzz terms I've been hearing a lot for the last one year but left unlearned so far. The WGJD was an awesome start-off.

Maven, is one concept I got wrong from the beginning, we've bee using it at our work place as an eclipse plugin for around a year now and I was under the notion that it's 'just a plugin'. Later from the book I understood, maven is a continuous integration tool that's initially run as an application itself via command line and once you get familiar with the cmd usage, you catch up easier with the maven plugins written for IDEs. Below are the ice-breaker steps to get maven running on your windows machine. 


  • Operating System : Windows 7 64 bit
  • Java 1.7 installed and path configured in environment variables

Steps To Install Maven In Windows

1. Download the binary (bin) file of maven from :

2. Extract it to C:\

Note: As in many Java/JVM-related software installations, it pays to not
install Maven into a directory with spaces in its name, because you might
get PATH and CLASSPATH errors. For example, if you're using a MS Windows
operating system, don't install Maven into a directory that looks like C:\Program

3. Add the M2_HOME For Windows-based operating systems, you'll add something like this:

4. Maven needs the Java JDK to run. Any version greater than 1.5 is fine. You'll also need to make sure that your JAVA_HOME environment variable is set—this has probably already been set if you have Java installed. You'll also need to be able to execute Maven-related commands from anywhere in your command line, so you should set the M2_HOME/bin directory to be in your PATH

5. Take the cmd : 

For Windows-based operating systems, you'll need to add this: 


Note that the above lines have to be entered every time when u start cmd to run maven. The best way is to add the property directly in the PATH field in My Computer (Righ Click) >  Properties> Choose Advanced Tab > Environment Variable.

You can now execute Maven (mvn) with its -version parameter to make sure the basic
install has worked.

mvn -version

Why Should I use Maven ? 

Previously, in java projects, when we required the apis from another framework we used to download the jar files from their respective websites and add it to the lib folder in the java project. This is tiresome process, sometimes your newly downloaded jar will have some dependency and need jar's from some other projects to work well. Maven simply automate the major portion of this task by using a pom.xml file. In the pom.xml file you can just specify the name and version of jar files and maven will fetch the same and it's dependencies from the repository. This is the crux of java but there is a lot more you can do from here. 
You can refer the book Well Grounded Java Developer from Manning to learn more about building your project from the pom.xml and doing several other operations.


1. Installing Maven -
2.  Mavens Official Website

3. The Well Grounded Java Developer  ( affiliate link ) 

Popular posts from this blog

ICFAI Sikkim Distance MBA Review From My Experience

After a long research I joined for the ICFAI distance MBA program in 2012. Now I've completed 2 semesters ( as of 2013 ). I wanted to write this review so that people who are looking for a good MBA program can get a hand-on review about the distance MBA offered by the ICFAI Sikkim. I've been through all the cycles of this program and this review might help you make the right choice about the program. This article presents my own ( and unbiased ) view of the program and is in no way associated with the course provider.

Is the MBA ICFAI Sikkim Approved By UGC?  As per the latest AICTE regulations, a distance education program must have the approval of a joint commission of  UGC- University Grant CommissionAICTE- All Indian Council for Technical EducationDEC- Distance Education CouncilICFAI Sikkim doesn't have this approval (don't get disappointed, it's not over yet). Only institutes and colleges affiliated to a University are required to take AICTE approval. So ICFAI be…

Best Places To Eat at Trivandrum

Are you searching for the most amazing places to eat at Trivandrum? Well, this article is a collection of places from where I've carried the taste after eating. All of them are located in Trivandrum. There is no specific focus for a single kind or restaurant, I've written about the latest hot-spot cafes to ethnic and traditional places at the heart of the city and people for decades.
General Places Azad Hotel Azad Hotel is a hotel-chain all over India and they are one of the best hotels in Trivandrum too. They claim to have introduced the popular dish 'biriyani' in India. However, they provide a good ambience and tasty food. There are all kind of popular non-vegetarian dishes available here. They have a long tradition of serving quality food and that's what makes them the best. There are
Zam Zam This is the most sought after destination in city for the best cooked chicken dishes. The 'Shawai' is the all time best seller of Zam Zam. It's very rushy alwa…

Is MacBook Air Good For Programming / Blogging ?

I'm a passionate java developer who just migrated from a Windows PC netbook ( Dell mini ) to a 13 inch MacBook Air. Before the netbook I owned a Dell inspirion 1501. I'm quite a bit of an avid blogger as well. I purchased Dell mini just as it was launched hoping that it's compact and mobile architecture would solve all of my need as a programmer and a writer. Unfortunately it turned out that it was a worthless device.The rest of the story goes...

Do Not Compare a Netbook With MacBook AirMacBook's astonishing features far exceeds anything that of a normal Netbook.Before
Buying a netbook for programming and blogging was one of the biggest blunders I ever made on choosing a machine. The screen was 11 inch and clumsy icons of the Windows were a disgrace all the time.The tightly arranged keys in the keyboard made typing a pain. It's slow Intel Atom Processor is too sluggish to run even VLC player.

After  The Mac's backlit spacious keyboard layout, 1440x900 resolution d…