title: Generate classes with jaxb2-maven-plugin from WSDL
body: <p>I am having trouble configuring the <code>jaxb2-maven-plugin</code> to generate Java classes from a WSDL and multiple XSD files that all exist in the same standard directory <code>src/main/xsd</code>.</p>
  
  <p><a href="https://stackoverflow.com/questions/14315651/how-to-use-jaxb2-maven-plugin-with-inline-xsd/">how to use jaxb2 maven plugin with inline XSD?</a> is related only in that the answers correctly suggest using the <code>wsdl</code> parameter in the plugin config but that question is really concerned with inline XSDs and my XSDs are external.</p>
  
  <p>The plugin goal parameters are listed <a href="http://mojo.codehaus.org/jaxb2-maven-plugin/xjc-mojo.html" rel="noreferrer">here</a>.</p>
  
  <p>My plugin configuration is:</p>
  
  <pre><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.5&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;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
          &lt;packageName&gt;com.x.y.model&lt;/packageName&gt;
          &lt;wsdl&gt;true&lt;/wsdl&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I am testing this with <code>mvn -X clean jaxb2:xjc</code> but the plugin is ignoring the <code>.wsdl</code> as seen in the debug output</p>
  
  <pre><code>[DEBUG] accept false for file c:\projects\foo\src\main\xsd\service.wsdl
  [DEBUG] accept true for file c:\projects\foo\src\main\xsd\datatypes.xsd
  [DEBUG] accept true for file c:\projects\foo\src\main\xsd\more-datatypes.xsd
  </code></pre>