title: Not able to generate classes through JAXB maven plugin
body: <p>I'm new to maven, I've a xsd file and am trying to generate JAXB classes for that but the below code is not generating any classes. Below is part of my pom.xml, after adding jaxb2-maven-plugin I did maven clean and maven install and there are no classes generated. Am I missing something or have I misplaced it ? any help would be appreciated.</p>
  
  <p><strong>Update</strong> : I was able to generate classes when I ran the command mvn jaxb2:xjc , but not when I do mvn clean install. What should be done for this ?</p>
  
  <pre><code>    &lt;build&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
  
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                  &lt;includes&gt;
                      &lt;include&gt;buildinfo.txt&lt;/include&gt;
                      &lt;include&gt;log4j.xml&lt;/include&gt;
                  &lt;/includes&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;/resource&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                  &lt;excludes&gt;
                      &lt;exclude&gt;buildinfo.txt&lt;/exclude&gt;
                      &lt;exclude&gt;log4j.xml&lt;/exclude&gt;
                  &lt;/excludes&gt;
                  &lt;filtering&gt;false&lt;/filtering&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
  
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                      &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                      &lt;version&gt;1.6.0&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;some-execution&lt;/id&gt;
                              &lt;phase&gt;compile&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;exec&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                      &lt;configuration&gt;
                          &lt;executable&gt;java&lt;/executable&gt;
                          &lt;workingDirectory&gt;target&lt;/workingDirectory&gt;
                          &lt;arguments&gt;
                              &lt;argument&gt;-cp&lt;/argument&gt;
                              &lt;argument&gt;classes:${rev-trac-properties}:dependency/*&lt;/argument&gt;
                              &lt;argument&gt;-Xdebug&lt;/argument&gt;
                              &lt;argument&gt;-Xrunjdwp:transport=dt_socket,address=${dport},server=y,suspend=n&lt;/argument&gt;
                              &lt;argument&gt;-Dtrac.home="${trac.home}"&lt;/argument&gt;
                              &lt;argument&gt;com.rev.trac.service.app.MainApp&lt;/argument&gt;
                          &lt;/arguments&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
                  &lt;!-- My code --&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.6&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;schemaDirectory&gt;src/main/webapp/schemas/&lt;/schemaDirectory&gt;
                      &lt;schemaFiles&gt;syncConfig.xsd&lt;/schemaFiles&gt;
                      &lt;packageName&gt;com.example.mapping&lt;/packageName&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.3.1&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${jdk.version}&lt;/source&gt;
                      &lt;target&gt;${jdk.version}&lt;/target&gt;
                      &lt;encoding&gt;ISO-8859-1&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;finalName&gt;${project.artifactId}-${project.version}&lt;/finalName&gt;
                      &lt;descriptors&gt;
                          &lt;descriptor&gt;assembly.xml&lt;/descriptor&gt;
                      &lt;/descriptors&gt;
                      &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${eclipsePluginVersion}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;!-- by default download all sources when generating project files --&gt;
                      &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                      &lt;classpathContainers&gt;
                          &lt;classpathContainer&gt;org.eclipse.jdt.launching.JRE_CONTAINER/${vmtype}/${jdkName}&lt;/classpathContainer&gt;
                      &lt;/classpathContainers&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.18&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  </code></pre>