title: mvn generate-sources fails, why isn't xml beans on classpath?
body: <p>I'm trying to generate java classes for OGC KML 2.2 as part of the maven generate-sources process using the org.codehaus.mojo xmlbeans-maven-plugin.  The java code appears to be generated correctly, but I get tons of errors during compilation complaining that 'package org.apache.xmlbeans'.  XMLBeans is clearly a dependency, it exists in my ~/.m2 repository, and I've been peek in the jar to make sure the classes are there.  It looks like XMLBeans is successfully generating java files in target/generated-sources, but somehow its absent from the classpath during compilation.</p>
  
  <p>I've tried changing the scope of the org.apache.xmlbeans dependency, but to no avail.</p>
  
  <p>Here's the pom.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;net.opengis&lt;/groupId&gt;
    &lt;artifactId&gt;ogc-kml&lt;/artifactId&gt;
    &lt;version&gt;2.2.0&lt;/version&gt;
    &lt;packaging&gt;pom&lt;/packaging&gt;
    &lt;name&gt;ogc-kml&lt;/name&gt;
  
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;xmlbeans-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.3.3&lt;/version&gt;
          &lt;executions&gt;
           &lt;execution&gt;
            &lt;goals&gt;
             &lt;goal&gt;xmlbeans&lt;/goal&gt;
            &lt;/goals&gt;
           &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;inherited&gt;true&lt;/inherited&gt;
          &lt;configuration&gt;
            &lt;download&gt;true&lt;/download&gt;
            &lt;schemaDirectory&gt;src/main/xsd&lt;/schemaDirectory&gt;
         &lt;/configuration&gt;
       &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
  
        &lt;dependency&gt;
          &lt;groupId&gt;org.apache.xmlbeans&lt;/groupId&gt;
          &lt;artifactId&gt;xmlbeans&lt;/artifactId&gt;
          &lt;version&gt;2.6.0&lt;/version&gt;
        &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
    &lt;/dependencyManagement&gt;
  </code></pre>
  
  <p>The project consists of a single src/main/xsd folder containing the two xsds from <a href="http://schemas.opengis.net/kml/2.2.0/" rel="nofollow">http://schemas.opengis.net/kml/2.2.0/</a>.  The entire folder structure is at <a href="https://github.com/iancw/maven-xmlbeans-question" rel="nofollow">https://github.com/iancw/maven-xmlbeans-question</a>.</p>
  
  <p>I can compile the classes by hand if I put the xmlbeans jar from my ~/.m2 repo on the classpath, e.g.</p>
  
  <pre><code>xmlbeans$ javac -classpath ~/.m2/repository/org/apache/xmlbeans/xmlbeans/2.4.0/xmlbeans-2.4.0.jar org/w3/x2005/atom/*.java org/w3/x2005/atom/impl/*.java net/opengis/kml/x22/*.java x0/oasisNamesTcCiqXsdschemaXAL2/*.java x0/oasisNamesTcCiqXsdschemaXAL2/impl/*.java net/opengis/kml/x22/*.java net/opengis/kml/x22/impl/*.java
  Note: Some input files use unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  xmlbeans$ 
  </code></pre>
  
  <p>I've looked through a number of examples and it seems like I'm doing this right.  I haven't seen anyone else complain of this issue.  Any maven mavens have suggestions?</p>
  
  <p>(A curious side note is that although i've tried both 2.4.0 and 2.6.0 of the xmlbeans dependency, maven hasn't ever seemed to download the 2.6.0 version into my repository)</p>