title: Execute a Maven plugin with --enable-preview in POM
body: <p>I have a custom Maven plugin which makes use of JDK 12 preview features. I compile the plugin setting <code>--enable-preview</code> as compiler arg, i.e.</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
          &lt;compilerArgs&gt;
              &lt;compilerArg&gt;--enable-preview&lt;/compilerArg&gt;
          &lt;/compilerArgs&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>When I want to execute the plugin, I add the plugin like this in the POM:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;my.group&lt;/groupId&gt;
      &lt;artifactId&gt;my-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;my-goal&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>But this fails with:</p>
  
  <pre><code>Preview features are not enabled for MyPluginMojo. Try running with '--enable-preview'
  </code></pre>
  
  <p>How can I enable preview features in a plugin execution?</p>