title: Maven: Get goal configuration from execution element
body: <p>Let's imagine I have following mojo:</p>
  
  <pre><code>@Mojo(name = "some-goal")
  public class MyMojo {
      @Parameter(required = true)
      protected ComplexObject param;
      /*...*/
  }
  </code></pre>
  
  <p>Also I have plugin's descriptor in pom:</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;!-- here artifact description --&gt;
    &lt;executions&gt;
       &lt;execution&gt;
         &lt;phase&gt;...&lt;/phase&gt;
         &lt;goals&gt;&lt;goal&gt;some-goal&lt;/goal&gt;&lt;/goals&gt;
         &lt;configuration&gt;
           &lt;param&gt;...&lt;/param&gt;
         &lt;/configuration&gt;
       &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>For test this plugin I use <strong>maven-plugin-testing-harness</strong></p>
  
  <p>And my test code is:</p>
  
  <pre><code>@Test
  public void test() throws Exception {
      File pom = getFile("mix/pom.xml");
  
      MyMojo plugin = (MyMojo) rule.lookupMojo("some-goal", pom);
      /*....*/
  </code></pre>
  
  <p>}</p>
  
  <p>Where rule is:</p>
  
  <pre><code>@Rule
  public MojoRule rule = new MojoRule() {
      @Override
      protected void before() throws Throwable {
      }
  
      @Override
      protected void after() {
      }
  };
  </code></pre>
  
  <p>But when I run test it fails with Exception:</p>
  
  <p>org.apache.maven.plugin.testing.ConfigurationException: Cannot find a configuration element for a plugin with an artifactId of {plugin-name}.</p>
  
  <pre><code>at org.apache.maven.plugin.testing.AbstractMojoTestCase.extractPluginConfiguration(AbstractMojoTestCase.java:619)
  at org.apache.maven.plugin.testing.AbstractMojoTestCase.extractPluginConfiguration(AbstractMojoTestCase.java:582)
  at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:353)
  at org.apache.maven.plugin.testing.MojoRule.lookupMojo(MojoRule.java:164)
  </code></pre>
  
  <p>When I debug source of <strong>maven-plugin-testing-harness</strong> I noticed that it read configuration from root plugin element only.</p>
  
  <p>How can I force it to read configuration from execution element?</p>