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 |
---|---|
|
|
PATH
Add the Maven /bin
directory to your PATH
variable:
Unix/Mac |
Windows |
---|---|
|
|
(!) 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'