Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you increase the heap size used by the GWT Maven Plugin when IntelliJ's "make" calls it?

I am upgrading my project from GWT 2.3.0 to 2.4.0. As a side affect, my GWT compilation fails because it runs out of memory. I searched online and found that you can specify additional memory parameters inside of the Maven pom.xml file (by adding a configuration block) like this:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.4.0</version>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <extraJvmArgs>-XX:MaxPermSize=512m -Xmx1024m</extraJvmArgs>
    </configuration>
</plugin>

This works if I build directly with Maven, but when I build with IntelliJ, it still runs out of memory. When I view the process details on my OS while IntelliJ is compiling, it is still using -Xmx128m as a flag passed to the JVM.

How can I configure the max memory that the plugin can use inside of IntelliJ?

like image 242
11101101b Avatar asked Jan 18 '12 19:01

11101101b


1 Answers

IntelliJ's GWT plugin will do the build using its own settings and won't use the ones in the Maven plugin.

You need to go to the projects settings (see http://www.jetbrains.com/idea/webhelp/gwt-facet.html)

You can increase your 'Compiler Maximum Heap' there.

like image 199
checketts Avatar answered Oct 05 '22 19:10

checketts