Enlightensoft's Blog

Helping in your each step

  • Categories

  • Authors

How to Configure MAVEN

Posted by Pankil Patel on May 16, 2012

Step 1: Download Maven zip from http://maven.apache.org/download.html (Ex: apache-maven-3.0.4-bin.zip)

Step 2: Unzip it into your drive (Ex: C:\java\apache-maven-3.0.4)

Step 3: Add system environment variables M2_HOME & M2 (Ex: M2_HOME=C:\java\apache-maven-3.0.4 & M2=C:\java\apache-maven-3.0.4\bin)

Step 4: Add M2 into your PATH system environment variable  (Ex: PATH=%M2%;%JAVA_HOME%\bin;%ANT_HOME%\bin)

Step 5: Set your MAVEN repository location :

  • Open file C:\java\apache-maven-3.0.4\conf\settings.xml for edit
  • uncomment <localRepository> tag in settings.xml file and set the repository location like below:<localRepository>C:\java\apache-maven-3.0.4\.m2\repository</localRepository>

Step 6: Verify your set up by typing command: mvn –version into your command prompt window.

It should give detail of your mvn like below:

C:\Documents and Settings\pankil.patel>mvn –version
Apache Maven 2.2.1 (r801777; 2009-08-07 00:46:01+0530)
Java version: 1.6.0_23
Java home: C:\java\jdk1.6.0_23\jre
Default locale: en_US, platform encoding: Cp1252
OS name: “windows xp” version: “5.1” arch: “x86” Family: “windows”
C:\Documents and Settings\pankil.patel>

You are now ready to use your MAVEN for your project…….



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: