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
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).