What is Apache Maven2?
Apache Maven
is a Java based build tool. It’s used for building and deploying Java projects.
Maven serves
a similar purpose to the Apache Ant tool, but it is based on different concepts
and works in a profoundly different manner. It can also be used to build and
manage projects written in C#, Ruby, Scala, and other languages.
Steps to install Apache Maven2 Tool:
1) Download the latest Maven2 distribution from http://maven.apache.org/download.html
2) Extract the zip file in
some folder (say D:\ApacheMaven2).
3) Set M2_HOME Environment variable to the Maven2 location.
M2_HOME = D:\ApacheMaven2
(Right
click My Computer >
Choose properties > Choose Advanced Tab >
Choose Environment Variables Button > In the System Variables, click New Button > Give the Variable Name: M2_HOME and Give the Value: D:\ApacheMaven2 > Click OK)
4) Edit the PATH Environment variable in System variables.
PATH= %M2_HOME%\bin;
Press
(WinKey + Pause)
Or
(Right
click My Computer > Choose properties > Choose Advanced Tab >
Choose Environment
Variables Button > In the System Variables, Click Edit button > Add the %M2_HOME%\bin; in the variable value > Click OK to finish)
5) Make
sure that you must have JDK installed and JAVA_HOME
environment variable is set to the JDK, which is required for running Maven.
6) To make sure that Maven works
correctly or not.
Press
(Winkey + R, then type cmd) and in
the command prompt, type “mvn
–version”. You will see the
installed Maven version.