I am trying to use maven for my project work but i am stuck with memory related issues.
When i run the maven i get the heap space error which i fixed using the following line
set MAVEN_OPTS="-Xmx1586m"
after this when i run the maven again, i don't get the heap space error but rather i get the PermGen space error. For solving that i used the following syntax
set MAVEN_OPTS="-Xmx1586m -XX:MaxPermSize=512m"
but once i start using the MaxPermSize option i get the following error
Invalid maximum heap size: -Xmx1586m -XX:MaxPermSize=512m
Could not create the Java virtual machine.
I have tried setting different value combination for Xmx and MaxPermSize to bring the size in control but all are invalid.
I get this error only when i put MaxPermSize option in the MAVEN_OPTS. Once i remove that option i don't get the error mentioned above but i do get the PermGen error.
Any suggestions what I am doing wrong?