How to control VM arguments for maven-jetty-plugin?

后端 未结 9 2234
鱼传尺愫
鱼传尺愫 2020-11-29 23:04

How to set VM arguments for Jetty run from maven-jetty-plugin?

For example, I need to pass -Xmx arguments to Jetty run by the mvn jetty:run

9条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 23:42

    It seems like your current approach is correct - when running jetty through maven, jetty is a thread inside the maven process. So increasing maven's heap will increase jetty's heap.

    How are you setting MAVEN_OPTS?

    One example I found looks like this: MAVEN_OPTS='-Xmx256m -Xms10m' mvn clean jetty:run

    Note that MAVEN_OPTS is an environment variable here, and not passed to the JVM (who wouldn't know what to do with it).

提交回复
热议问题