title: error when including dependency within the plugin under execution in maven
body: <p>I have the following pom.xml which works if I execute the mvn goal <code>mvn hibernate3:hbm2java</code> directly. I now want to make it part of execution during <code>generate-entity</code> phase. I have a few dependencies included in the plugin.</p>
  
  <p>Here is the working pom.</p>
  
  <pre><code>   &lt;plugins&gt;
           &lt;plugin&gt;
             &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
             &lt;artifactId&gt;hibernate3-maven-plugin&lt;/artifactId&gt;
             &lt;version&gt;2.2&lt;/version&gt;
               &lt;configuration&gt;
                 &lt;components&gt;
                   &lt;component&gt;
                     &lt;name&gt;hbm2java&lt;/name&gt;
                     &lt;implementation&gt;jdbcconfiguration&lt;/implementation&gt;
                     &lt;outputDirectory&gt;src/main/java&lt;/outputDirectory&gt;
                   &lt;/component&gt;
                 &lt;/components&gt;
                 &lt;componentProperties&gt;
                   &lt;revengfile&gt;src/main/resources/reveng.xml&lt;/revengfile&gt;
                   &lt;propertyfile&gt;src/main/resources/hibernate.properties&lt;/propertyfile&gt;
                   &lt;packagename&gt;com.whatever.domain&lt;/packagename&gt;
                   &lt;jdk7&gt;true&lt;/jdk7&gt;
                   &lt;ejb3&gt;true&lt;/ejb3&gt;
                 &lt;/componentProperties&gt;
               &lt;/configuration&gt;
               &lt;dependencies&gt;
                 &lt;dependency&gt;
                   &lt;groupId&gt;cglib&lt;/groupId&gt;
                   &lt;artifactId&gt;cglib-nodep&lt;/artifactId&gt;
                   &lt;version&gt;2.2.2&lt;/version&gt;
                 &lt;/dependency&gt;
                 &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;5.1.22&lt;/version&gt;
          &lt;/dependency&gt;
               &lt;/dependencies&gt;
             &lt;/plugin&gt;
          &lt;/plugins&gt;
  </code></pre>
  
  <p>This works as expected when I execute <code>mvn hibernate3:hbm2java</code>.</p>
  
  <p>But I included execution section in my pom.xml. Now Eclipse prompts me with this error message</p>
  
  <p><code>cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependencies'. One of '{"http://
   maven.apache.org/POM/4.0.0":inherited}' is expected.</code></p>
  
  <p>Here is the modified pom.xml that has issues near the <code>dependencies block</code> inside plugin</p>
  
  <pre><code>&lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate3-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.2&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;generate-entity&lt;/id&gt;
                          &lt;phase&gt;generate-entity&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;hbm2ddl&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;components&gt;
                                  &lt;component&gt;
                                      &lt;name&gt;hbm2hbmxml&lt;/name&gt;
                                      &lt;implementation&gt;jdbcconfiguration&lt;/implementation&gt;
                                      &lt;outputDirectory&gt;src/main/java&lt;/outputDirectory&gt;
                                  &lt;/component&gt;
                                  &lt;component&gt;
                                      &lt;name&gt;hbm2java&lt;/name&gt;
                                      &lt;implementation&gt;jdbcconfiguration&lt;/implementation&gt;
                                      &lt;outputDirectory&gt;src/main/java&lt;/outputDirectory&gt;
                                  &lt;/component&gt;
                              &lt;/components&gt;
                              &lt;componentProperties&gt;
                                  &lt;revengfile&gt;src/main/resources/reveng.xml&lt;/revengfile&gt;
                                  &lt;propertyfile&gt;src/main/resources/hibernate.properties&lt;/propertyfile&gt;
                                  &lt;packagename&gt;com.whatever.domain&lt;/packagename&gt;
                                  &lt;jdk7&gt;true&lt;/jdk7&gt;
                                  &lt;ejb3&gt;true&lt;/ejb3&gt;
                              &lt;/componentProperties&gt;
                          &lt;/configuration&gt;
                          &lt;dependencies&gt; --- Eclipse shows errors here
                              &lt;dependency&gt;
                                  &lt;groupId&gt;cglib&lt;/groupId&gt;
                                  &lt;artifactId&gt;cglib-nodep&lt;/artifactId&gt;
                                  &lt;version&gt;2.2.2&lt;/version&gt;
                              &lt;/dependency&gt;
                              &lt;dependency&gt;
                                  &lt;groupId&gt;mysql&lt;/groupId&gt;
                                  &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
                                  &lt;version&gt;5.1.22&lt;/version&gt;
                              &lt;/dependency&gt;
                          &lt;/dependencies&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  </code></pre>