Installing Maven in Windows/Linux

In this article we are going to see how to setup maven in PC. Primarily I will install maven in windows PC.
What is maven? Maven is a tool for java application build management. Maven is targeted for
- Making the build process easy
- Providing a uniform build system
- Providing quality project information
- Providing guidelines for best practices development
- Allowing transparent migration to new features

Later on, we will use maven to build test tools and frameworks. So, let's start

Step 1 : Java Installations : In windows PC(I use windows 7 64) we need to have latest JAVA Installed.Download link. And JAVA_HOME variable is added in Windows environment variable. To see , how to add, follow my this post.


Step 2 : Maven Download : Download and extract Apache Maven project from this link to a suitable directory in your PC. (I saved to D:\Maven)

Step 3: Set Pats :
-Set MAVEN_HOME to windows environment and point to maven folder(d:\Maven)
 
-Add maven bin folder path to system's path variable

Now, we are done. To check , open command prompt and write
mvn -version

If you see maven versions, that means we have completed maven installation.

To install in Ubuntu : Write this command in terminal
$ sudo apt-get install maven
For checking , same as windows command.

To install in CentOs, We have to set system veritable in a shell script file(sh) and run automatically every time PC starts. The full process is shown in here.

Thanks...:)