Maven PermGen space OutOfMemoryError issue

If you get something like
[ERROR] PermGen space -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
...try doing this to resolve this OutOfMemoryError issue:

 export MAVEN_OPTS="-Xmx1g -XX:MaxPermSize=512m"