title: How can I tell jaxb / Maven to generate multiple schema packages?
body: <p>Example:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;/plugin&gt;       
         &lt;plugin&gt;
             &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
             &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
             &lt;version&gt;0.7.1&lt;/version&gt;
             &lt;executions&gt;
               &lt;execution&gt;
                 &lt;goals&gt;
                   &lt;goal&gt;generate&lt;/goal&gt;
                 &lt;/goals&gt;
               &lt;/execution&gt;
             &lt;/executions&gt;
              &lt;configuration&gt;
               &lt;schemaDirectory&gt;src/main/resources/dir1&lt;/schemaDirectory&gt;
                &lt;schemaIncludes&gt;
                    &lt;include&gt;schema1.xsd&lt;/include&gt;
                &lt;/schemaIncludes&gt;
                &lt;generatePackage&gt;schema1.package&lt;/generatePackage&gt;
             &lt;/configuration&gt;
           &lt;/plugin&gt;
            &lt;plugin&gt;
             &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
             &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
             &lt;version&gt;0.7.1&lt;/version&gt;
             &lt;executions&gt;
               &lt;execution&gt;
                 &lt;goals&gt;
                   &lt;goal&gt;generate&lt;/goal&gt;
                 &lt;/goals&gt;
               &lt;/execution&gt;
             &lt;/executions&gt;
              &lt;configuration&gt;
               &lt;schemaDirectory&gt;src/main/resources/dir2&lt;/schemaDirectory&gt;
                &lt;schemaIncludes&gt;
                    &lt;include&gt;schema2.xsd&lt;/include&gt;
                &lt;/schemaIncludes&gt;
                &lt;generatePackage&gt;schema2.package&lt;/generatePackage&gt;
             &lt;/configuration&gt;
           &lt;/plugin&gt;
         &lt;/plugins&gt;
  </code></pre>
  
  <p>What happened:
  Maven executes the the first plugin. Then deletes the target folder and creates the second package, which then is visible.</p>
  
  <p>I tried to set target/somedir1 for the first configuration and target/somedir2 for the second configuration. But the behavior does not not change? Any ideas? I do not want to generate the packages directly in the src/main/java folder, because these packages are genereated and should not be mixed with manual created classes.</p>