3

When I run maven clean install from the command line it runs fine without any issues. However, when I run maven clean install through eclipse it gives and error. I configured an external maven source and do not use the embedded maven resource which is used by eclipse.

[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ client ---
[INFO] Compiling 2612 source files to C:\Users\Name\workspace\projectname\client\src\main\webbapp\WEB-INF\classes  
java.lang.OutOfMemoryError: PermGen space
Dumping heap to java_pid5368.hprof ...
Heap dump file created [126539667 bytes in 0.924 secs]
[ERROR] PermGen space -> [Help 1]

It runs fine when I run the maven clean install from the same source directory on the command prompt however, it is not working when I run it when it is configured through eclipse.What must be done?

MindBrain
  • 7,398
  • 11
  • 54
  • 74
  • 1
    look once on this 'http://stackoverflow.com/questions/3101128/java-lang-outofmemoryerror-permgen-space – Dinup Kandel Sep 03 '12 at 06:32
  • 1
    1. Check if you use external maven installation in Eclipse. 2. Try to increase permgen for eclipse 3. set memory params in your build configuration in eclipse. – yatul Sep 03 '12 at 06:37
  • Yes Dinup I had increased the maven_opts MaxPermSize to 1024m which is large enough before I posted this issue. However, on maven clean install I still get this error for my java project.Thank you for your responses.Hi Yatul, I had configured to use a an external maven installation and do not use the embedded maven installation.Still this error remains. – MindBrain Sep 03 '12 at 22:16

1 Answers1

0

Use this for maven as well as your eclipse :)

export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=4096M -XX:ReservedCodeCacheSize=1024m"
export JAVA_OPTS="-Xmx2g -XX:MaxPermSize=4096M -XX:ReservedCodeCacheSize=1024m"
Dragonborn
  • 1,755
  • 1
  • 16
  • 37