title: How to make JAXB to annotate and provide equlas/hash code implementation
body: <p>I am trying to use JAXB to generate classes from WSDL which are annotated with Jsr303Annotations and provide implementation of equals and hashcode.</p>
  
  <p>Both of these work separately, however when i try to achieve both requirements then i get error: </p>
  
  <p><em>An internal error occurred during: "Building workspace".
  com.sun.tools.xjc.Plugin: Provider org.jvnet.jaxb2_commons.plugin.fixjaxb1058.FixJAXB1058Plugin could not be instantiated: java.lang.NoClassDefFoundError: org/jvnet/jaxb2_commons/reflection/util/Accessor</em></p>
  
  <p>Could somebody tell me how to configure JAXB to do both of these ?</p>
  
  <p>Bellow is my attempt to do so:</p>
  
  <pre><code>&lt;plugin&gt;
                  &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;generate-wsdl&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;schemaDirectory&gt;src/main/resources&lt;/schemaDirectory&gt;
                              &lt;schemaIncludes&gt;
                                  &lt;include&gt;*.wsdl&lt;/include&gt;
  &lt;!--                                &lt;include&gt;*.xsd&lt;/include&gt; --&gt;
                              &lt;/schemaIncludes&gt;
  &lt;!--                            &lt;forceRegenerate&gt;true&lt;/forceRegenerate&gt; --&gt;
                              &lt;!-- &lt;removeOldOutput&gt;true&lt;/removeOldOutput&gt; --&gt;
                              &lt;!-- &lt;cleanPackageDirectories&gt;true&lt;/cleanPackageDirectories&gt; --&gt;
                              &lt;strict&gt;true&lt;/strict&gt;
                              &lt;extension&gt;true&lt;/extension&gt;
                              &lt;args&gt;
                                  &lt;arg&gt;-XJsr303Annotations&lt;/arg&gt;
                                  &lt;arg&gt;-Xannotate&lt;/arg&gt;
                                  &lt;arg&gt;-Xequals&lt;/arg&gt;
                                  &lt;arg&gt;-XhashCode&lt;/arg&gt;
                              &lt;/args&gt;
                              &lt;plugins&gt;
                                  &lt;plugin&gt;
                                  &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt;
                                  &lt;artifactId&gt;jaxb2-basics-annotate&lt;/artifactId&gt;
                                  &lt;version&gt;0.6.3&lt;/version&gt;
                                  &lt;/plugin&gt;
                                  &lt;plugin&gt;
                                      &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt;
                                      &lt;artifactId&gt;jaxb2-basics&lt;/artifactId&gt;
                                      &lt;version&gt;0.9.4&lt;/version&gt;
                                  &lt;/plugin&gt;
                                  &lt;plugin&gt;
                                      &lt;groupId&gt;com.github.krasa&lt;/groupId&gt;
                                      &lt;artifactId&gt;krasa-jaxb-tools&lt;/artifactId&gt;
                                      &lt;version&gt;1.1&lt;/version&gt;
                                  &lt;/plugin&gt;
                              &lt;/plugins&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>Edit: Relevant dependencies i have tried to use:</p>
  
  <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb2-basics-runtime&lt;/artifactId&gt;
              &lt;version&gt;0.9.4&lt;/version&gt;
          &lt;/dependency&gt;
  
  &lt;!--        &lt;dependency&gt; --&gt;
  &lt;!--            &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt; --&gt;
  &lt;!--            &lt;artifactId&gt;jaxb2-basics-annotate&lt;/artifactId&gt; --&gt;
  &lt;!--            &lt;version&gt;1.0.0&lt;/version&gt; --&gt;
  &lt;!--        &lt;/dependency&gt; --&gt;
  
  
  &lt;!--        &lt;dependency&gt; --&gt;
  &lt;!--        &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt; --&gt;
  &lt;!--        &lt;artifactId&gt;jaxb2-commons-lang&lt;/artifactId&gt; --&gt;
  &lt;!--        &lt;version&gt;2.3&lt;/version&gt; --&gt;
  &lt;!--        &lt;/dependency&gt; --&gt;
  </code></pre>
  
  <p>Only the combination of first dependency and plugin for equals/hash code yield result. </p>
  
  <p>If i include the other 2 dependencies then i get missing artifact -id message for every dependency in project.</p>
  
  <p>Plugins for annotations work without explicit dependencies, when used without equals/hashcode plugin and vice versa.</p>
  
  <p><strong>Edit: Final solution in case anyone gets stuck on same issue</strong></p>
  
  <p>So it was required to separate annotations and equals/hash code plugins into separate executions, this resolved all issues. </p>