title: Maven Jaxb2 xjc plugin error No schemas have been found
body: <p>These days I've spent some time on JAXB for converting XSD to Java Class and vice versa. Here's a very good tutorial for beginners, <a href="http://www.journaldev.com/1312/how-to-generate-java-classes-from-xsd-using-xjc-maven-plugin" rel="noreferrer">http://www.journaldev.com/1312/how-to-generate-java-classes-from-xsd-using-xjc-maven-plugin</a>. I follow the steps strictly, but always get error when <code>mvn clean install</code></p>
  
  <p>Here's my <code>pom.xml</code> file.</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;jd&lt;/groupId&gt;
      &lt;artifactId&gt;jd&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;!-- Plugin required to build java classes from XSD using XJC --&gt;
              &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;!-- The name of your generated source package --&gt;
                      &lt;arguments&gt;-extension -npa -b ${project.basedir}/src/main/java/com/moodys/jaxb/global.xjb&lt;/arguments&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>But when I type <code>mvn clean install</code>, it always give me error as following:</p>
  
  <pre><code>C:\Users\congy\Desktop\Work\workspace\JaxbFromClass&gt;mvn clean jaxb2:xjc
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building jd 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jd ---
  [INFO] Deleting C:\Users\congy\Desktop\Work\workspace\JaxbFromClass\target
  [INFO]
  [INFO] --- jaxb2-maven-plugin:1.5:xjc (default-cli) @ jd ---
  [INFO] Generating source...
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 0.487s
  [INFO] Finished at: Thu Jul 04 19:09:37 CST 2013
  [INFO] Final Memory: 4M/122M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.5:xjc (default-cli) on project jd: No schemas have been found -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>Can anyone show me the cause or simply tell me what should I refer to for further information? </p>
  
  <p>Another question is : according to this question <a href="https://stackoverflow.com/questions/2432859/difference-of-maven-jaxb-plugins">Difference of Maven JAXB plugins</a>, there's at least three jaxb plugins. So all of these plugins are all generated for the same purposes? If so ,why? </p>
  
  <p>Thanks in advance!</p>