Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

A number of environment variables must be set for optimal Maven performance. For UNIX operating systems one typically modifies a startup file like ~/.bash_login to set and export shell variables while Mac users typically set and export environment variables in .bash_profile. For Windows, go to Start -> Control Panel -> System -> Advanced -> Environment Variables and set your Maven environment variables via the GUI.

MAVEN_HOME

Set the MAVEN_HOME environment variable to point to the base directory of your Maven installation.

Unix/Mac

Windows

export MAVEN_HOME=/opt/maven/apache-maven-2.0.8

set MAVEN_HOME=C:\apache-maven-2.0.8

PATH

Add the Maven /bin directory to your PATH variable:

Unix/Mac

Windows

export PATH=$PATH:$MAVEN_HOME/bin

;C:\apache-maven-2.0.8\bin

(!) Windows: append string to the end of the {{Path}} system variable

h5. MAVEN_OPTS

Maven does not read {{JAVA_OPTS}} on start up, resulting occasionally in "Out of Memory" errors when building Sakai. To assure sufficient memory allocation during builds, you should add a {{MAVEN_OPTS}} environment variable as defined below. For UNIX operating systems one typically modifies a startup file like ~/.bash_login to set and export shell variables while Mac users typically set and export environment variables in {{.bash_profile}}. For Windows, go to {{Start -> Control Panel -> System -> Advanced -> Environment Variables}} and set {{JAVA\_HOME}} via the GUI.

export MAVEN_OPTS='-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m'

 
  • No labels