forum

Home / DeveloperSection / Forums / How to Increase memory of tomcat7 maven plugin?

How to Increase memory of tomcat7 maven plugin?

Manoj Bhatt 5196 16-Oct-2014

I want to start an embedded tomcat7 instance directly from maven using the tomcat7-maven-plugin. This is working fine, but the Tomcat started doesn't seem to have enough memory. I suspect that I would need to set.

-XX:MaxPermSize=256m

but I can't figure out how to do it.

The documentation says one should use the "systemProperties" element in the "configuration" section of the plugin. However, the options are specified as XML elements and would need to look like that:

<configuration>
  <systemProperties>
    <XX:MaxPermSize>256m</XX:MaxPermSize>
  </systemProperties>
</configuration>

But that's of course not possible as it breaks the XML (XX is interpreted as a namespace).

Of course I could get around this problem by setting environment variable

MAVEN_OPTS=-XX:MaxPermSize=256m

but I would prefer to only increase it for the embedded Tomcat. Any ideas how to do that?


Updated on 16-Oct-2014

Can you answer this question?


Answer

1 Answers

Liked By