On a Linux/Unix machine the "mvn" command will use a shell variable "MAVEN_OPTS" to pass in options. This is useful if you want to give Maven more memory. In your .profile or .bash_profile put a line like this in:
export MAVEN_OPTS=-javaagent
On windows:
in shell (cmd.exe) type "set MAVEN_OPTS=..."
or
add MAVEN_OPTS to your environment
On NetBeans:
In ~/.netbeans/6.5/, create etc/netbeans.conf. Add your environment variables there, e.g.:
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"