title: How to generate Java classes from WSDL with jaxb2-maven-plugin 2.x?
body: <p>I am trying using the pluggin <code>jaxb2-maven-plugin</code> to create the Java class from the wsdl.</p>
  
  <p>With the version 1.5 this code from <a href="https://stackoverflow.com/questions/15903249/generate-classes-with-jaxb2-maven-plugin-from-wsdl">Generate classes with jaxb2-maven-plugin from WSDL</a> works:</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;!-- Package to store the generated file --&gt;
                      &lt;packageName&gt;com.example.demo.wsdl&lt;/packageName&gt;
                      &lt;!-- Treat the input as WSDL --&gt;
                      &lt;wsdl&gt;true&lt;/wsdl&gt;
                      &lt;!-- Input is not XML schema --&gt;
                      &lt;xmlschema&gt;false&lt;/xmlschema&gt;
                      &lt;!-- The WSDL file that you saved earlier --&gt;
                      &lt;schemaFiles&gt;horarios.wsdl&lt;/schemaFiles&gt;
                      &lt;!-- The location of the WSDL file --&gt;
                      &lt;schemaDirectory&gt;${project.basedir}/src/main/resources&lt;/schemaDirectory&gt;
                      &lt;!-- The output directory to store the generated Java files --&gt;
                      &lt;outputDirectory&gt;${project.basedir}/src/main/java&lt;/outputDirectory&gt;
                      &lt;!-- Don't clear output directory on each run --&gt;
                      &lt;clearOutputDir&gt;false&lt;/clearOutputDir&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>But when use plugin version 2.3.1, I get this error:</p>
  
  <pre><code>Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.3.1:xjc (xjc) on project demo: MojoExecutionException: NoSchemasException -&gt; [Help 1]
  </code></pre>
  
  <p>Does someone know how use WSDL file with this new plugin version? </p>