Artikel Terbaru

Monday, 6 December 2010

Install and configure maven in windows

Setup maven on local windows:-


Download maven software from apache site and extract the files, copy it local drive example D:\java\apache-maven-3.0.3

Before that you need to set below environment variables on your local box

set M3_HOME variable to maven home folder(for ex say D:\java\apache-maven-3.0.3)
add M3_HOME variable to environment varilabe PATH (ex:- %PATH%\%M2_HOME%\bin)

To know mvn installed correctly, open command window and execute the following command,
mvn --version

It will be displays the maven version and the java version. The following is the screen shot attached for this command

Install, configure Maven in windows

Fix for  java.lang.OutOfMemoryError issue in maven:-

using maven install command,Maven compile,copy and execute the integration test. if your project is big, then there are too many objects in the heap memory, if the heap memory is not accommdating your project running object execution size, this exception will be thrown.


MAVEN_OPTS="-Xmx512m -Xms512m -XX:MaxPermSize=512m" 

Please share your comments on this.