How to install Maven

How to install Maven ?


Defining Maven in a single line is not possible .Maven do many things for us like resolving dependencies, create project structure, build  a project, creating war/jar etc. By using Maven you can also create portlet, theme, services without any need of sdk. So lets install maven.

Lets Start this step by step:-

Step 1:-Install Java(jdk)
For installing Maven first we need to download jdk from  Here and install.Then set the environment variable(User Variable).For setting environment variable in window 7 .
Click start-->right click on computer-->properties-->Advanced system setting-->Advanced-->Environment variable-->New

The two important variables are:-

1)PATH
  This environment variable is provide the path of  javac otherwise you have to copy paste your java file into bin and then compile your file from inside the bin folder of jdk. Ex-

  PATH = C:\Program Files\Java\jdk1.8.0_31\bin

2)JAVA_HOME
  This variable is need to run many other software like tomcat and maven.This takes the path till jdk. Ex-

  JAVA_HOME = C:\Program Files\Java\jdk1.8.0_31





For Checking that java install successfully you can open command prompt(win+r then type cmd) and type java -version this will give you detail as:-







Step 2:-Install Maven

  • For installing Maven first we need to download maven from here and extract in C drive .
  • Then set  M2_HOME = C:\apache-maven-3.2.3
  • Then set PATH = C:\apache-maven-3.2.3\bin
Now your path become:-

PATH = C:\Program Files\Java\jdk1.8.0_31\bin;C:\apache-maven-3.2.3\bin

Seperated by ;

Step 3:-Check Maven
For Checking that Maven install successfully you can open command prompt(win+r then type cmd) and type mvn -version this will give you detail as:-








Hope this will help....

Next Post:- Creating Portlet/Services using Maven

Related Post:-

Liferay Service Builder in Detail

How to install Ant

Creating Portlet/Services using Maven