Install Maven 2.2+

  1. Download Maven 2.2.X (minimum of 2.2.1) - http://maven.apache.org/download.html
    • NOTE: some support exists for Maven 3 but there are a few things that do not work as of 6 Sep 2011
  2. Extract to /opt (should create apache-maven-2.X.X folder)
  3. Set environment variable: MAVEN2_HOME=/opt/apache-maven-2.X.X
  4. Add $MAVEN2_HOME/bin to PATH\
  5. Set the MAVEN_OPTS environment variable (in linux/OSX this is typically done in ~/.bash_profile)

    export MAVEN_OPTS='-Xms128m -Xmx796m -XX:PermSize=64m -XX:MaxPermSize=172m'
    

    • Adding -XX:+AggressiveOpts may speed up your builds depending on your OS, JVM, and system hardware