title: Maven JAXB2 XJC plugin: M2E plugin execution not covered
body: <p>I am using using the <code>jaxb2 xjc</code> plugin for generating java files from a <code>XSD</code>. Therefore I used to configure my pom.xml as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb2-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;xjc&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;packageName&gt;com.mypackage.model&lt;/packageName&gt;
                  &lt;schemaDirectory&gt;${basedir}/src/main/resources/XSD&lt;/schemaDirectory&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &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;source&gt;1.6&lt;/source&gt;
                 &lt;target&gt;1.6&lt;/target&gt;
             &lt;/configuration&gt;
         &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>I changed my developing environment to Eclipse Indigo and this does not work any more. The error says: "Plugin execution not covered by lifecycle configuration". I understand I have to define the execution of my plugin differently so that it works in my new environment. </p>
  
  <p>I followed the instructions on this page <a href="http://wiki.eclipse.org/M2E_plugin_execution_not_covered" rel="noreferrer">M2E plugin execution not covered</a> but the source files are not generated when executing the <code>generate-sources</code> phase.</p>
  
  <p>Could anybody show me how to exactly refactor my pom so that my files are properly generated?</p>
  
  <p>Thanks for helping!</p>