title: How to specify JVM argument for Maven built executable JAR
body: <p>When using Maven to build an executable JAR, how do I specify the JVM arguments that are used when the JAR is executed?</p>
  
  <p>I can specify the main class using <code>&lt;mainClass&gt;</code>. I suspect there's a similar attribute for JVM arguments. Specially I need to specify the maximum memory (example -Xmx500m).</p>
  
  <p>Here's my assembly plugin:</p>
  
  <pre><code>  &lt;plugin&gt;
      &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
        &lt;descriptorRefs&gt;
          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
        &lt;/descriptorRefs&gt;
        &lt;archive&gt;
          &lt;manifest&gt;
            &lt;addClasspath&gt;true&lt;/addClasspath&gt;
            &lt;mainClass&gt;com.me.myApplication&lt;/mainClass&gt;
          &lt;/manifest&gt;
        &lt;/archive&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>Edit/Follow-up: It seems that it might not be possible to specify JVM arguments for an executable JAR according to <a href="http://forums.sun.com/thread.jspa?threadID=633125&amp;messageID=3667132" rel="noreferrer">this</a> and <a href="http://www.javalobby.org/forums/thread.jspa?threadID=15486&amp;tstart=0#91817576" rel="noreferrer">this</a> post.</p>