title: Jaxb 2 Maven Plugin - how to make maven respect XSD namespaces?
body: <p>I have a question according to any jaxb2 plugins for maven. I want to generate sources from XSD schema. Normally if I run xjc from command line xjc generates all the sources according to their namespaces (like <strong>core</strong>:AccountType to <strong>core</strong>/AccountType.java etc.)</p>
  
  <pre><code>cmd&gt; xjc PublEnvlp.xsd
  </code></pre>
  
  <p>I want to use same feature using some of maven plugins but it creates all java classes to one directory so there are duplication conflicts. Is there any flag, plugin, feature, ... to make maven work same as command line xjc command?  I am using code below in maven: </p>
  
  <pre class="lang-xml prettyprint-override"><code>&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.1&lt;/version&gt;
  &lt;executions&gt;
      &lt;execution&gt;
          &lt;id&gt;xjc&lt;/id&gt;
          &lt;goals&gt;
              &lt;goal&gt;xjc&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
              &lt;packageName&gt;package.name&lt;/packageName&gt;
              &lt;schemaDirectory&gt;src/main/resources/DataArchitecture/XML/RDF/Physical_Xml&lt;/schemaDirectory&gt;
              &lt;forceRegenerate&gt;true&lt;/forceRegenerate&gt;
              &lt;verbose&gt;true&lt;/verbose&gt;
          &lt;/configuration&gt;
      &lt;/execution&gt;
  &lt;/executions&gt;
  </code></pre>
  
  <p></p>