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 me
You can set the properties in this way
<configuration>
<systemProperties>
<JAVA_OPTS>-Xms256m -Xmx512m -XX:MaxPermSize=256m</JAVA_OPTS>
</systemProperties>
</configuration>
This one worked for me:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>...</version>
<configuration>
<container>...</container>
<configuration>
<type>standalone</type>
<home>...</home>
<properties>
<cargo.jvmargs>-Xmx4096m</cargo.jvmargs>
</properties>
</configuration>
<deployables>...</deployables>
</configuration>
</plugin>
It starts up my tomcat8 in a new JVM with argument "-Xmx4096m".
As most said in the comments above the properties in pom.xml has no effct. What worked for me was setting my MAVEN_OPTS
MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m"
Or on Windows in a cmd terminal:
set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=256m
For mac/linux users, just add an export statement to your ~/.profile (or similar file name). For example:
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m"
And restart your shell.