Increase memory of tomcat7 maven plugin?

前端 未结 3 1449
长发绾君心
长发绾君心 2020-12-10 10:43

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

3条回答
  •  Happy的楠姐
    2020-12-10 11:08

    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.

提交回复
热议问题