title: How to add include=JsonSerialize.Inclusion.NON_NULL to @JsonSerialize using annox plugin
body: <p>We are generating JAXB objects from xsd, using maven plugin maven-jaxb2-plugin. Below are dependencies we have</p>
  
  <p>jaxb2-basics - 0.6.2
  <br>jaxb2-basics-annotate - 0.6.2</p>
  
  <p>In our maven file, we also included -Xannotate and -XtoString  </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;exec1&lt;/id&gt;
                              &lt;phase&gt;generate-sources&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;generate&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;configuration&gt;
                                  &lt;schemaDirectory&gt;${basedir}/src/main/resources/xsd&lt;/schemaDirectory&gt;
                                  &lt;bindingDirectory&gt;${basedir}/src/main/resources/xsd&lt;/bindingDirectory&gt;
                                  &lt;generatePackage&gt;org.learning.json.generated&lt;/generatePackage&gt;
                                  &lt;generateDirectory&gt;${basedir}/generated&lt;/generateDirectory&gt;
                                  &lt;clearOutputDir&gt;false&lt;/clearOutputDir&gt;
                                  &lt;includeSchemas&gt;
                                      &lt;includeSchema&gt;Person.xsd&lt;/includeSchema&gt;
                                  &lt;/includeSchemas&gt;
                                  &lt;plugins&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.6.2&lt;/version&gt;
                                      &lt;/plugin&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.2&lt;/version&gt;
                                      &lt;/plugin&gt;
                                  &lt;/plugins&gt;
                                  &lt;args&gt;
                                      &lt;arg&gt;-Xannotate&lt;/arg&gt;
                                      &lt;arg&gt;-XtoString&lt;/arg&gt;
                                  &lt;/args&gt;
                              &lt;/configuration&gt;
                          &lt;/execution&gt;
  </code></pre>
  
  <p>The binding file is as below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
                 xmlns:xs="http://www.w3.org/2001/XMLSchema" 
                 xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                 xmlns:annox="http://annox.dev.java.net"
                 jaxb:extensionBindingPrefixes="xjc annox"
                 jaxb:version="2.0"&gt;
  
       &lt;jaxb:bindings schemaLocation="Person.xsd" multiple="true"&gt;  
          &lt;jaxb:bindings node="xs:complexType[@name='personType']/xs:sequence/xs:element[@type='xs:date']" multiple="true"&gt;
              &lt;annox:annotate&gt;
                  &lt;annox:annotate target="getter" annox:class="org.codehaus.jackson.map.annotate.JsonSerialize" 
                                  using="org.learning.json.JsonDateSerializer"/&gt;
              &lt;/annox:annotate&gt;
          &lt;/jaxb:bindings&gt;
       &lt;/jaxb:bindings&gt;
  &lt;/jaxb:bindings&gt;
  </code></pre>
  
  <p>This did add @JsonSerialize(using=JsonDateSerializer.class). But I tried few options like below to add 
  include=JsonSerialize.Inclusion.NON_NULL, but did not work</p>
  
  <pre><code>&lt;annox:annotate&gt;
                  &lt;annox:annotate target="getter" annox:class="org.codehaus.jackson.map.annotate.JsonSerialize" 
                                  using="org.learning.json.JsonDateSerializer"
          include="org.codehause.jackson.map.annotate.JsonSerialize.Inclusion.NON_NULL"/&gt;
              &lt;/annox:annotate&gt; 
  
  
  
  &lt;annox:annotate&gt;
                  &lt;annox:annotate target="getter" annox:class="org.codehaus.jackson.map.annotate.JsonSerialize" 
                                  using="org.learning.json.JsonDateSerializer"
          include="org.codehause.jackson.map.annotate.JsonSerialize$Inclusion.NON_NULL"/&gt;
              &lt;/annox:annotate&gt; 
  </code></pre>
  
  <p>But in all cases, getting ValueParseException. So what is the correct way of having parameters like include(), typing() of JsonSerialize be added to annotation.</p>
  
  <p>Also, based on <a href="https://stackoverflow.com/questions/26227869/how-to-add-jackson-annotations-to-pojo-generated-from-xsd-by-jaxb-xjc">How to add Jackson annotations to POJO generated from XSD by JAXB/XJC?</a> 
  I also tried </p>
  
  <pre><code>&lt;jaxb:bindings schemaLocation="Person.xsd" multiple="true"&gt;  
          &lt;jaxb:bindings node="xs:complexType[@name='personType']/xs:sequence/xs:element[@type='xs:date']" multiple="true"&gt;
              &lt;annox:annotate&gt;
                  &lt;annox:annotate target="getter" annox:class="org.codehaus.jackson.map.annotate.JsonSerialize" 
                                  using="org.learning.json.JsonDateSerializer"/&gt;
              &lt;/annox:annotate&gt;
              &lt;annox:annotate&gt;
                      @org.codehaus.jackson.map.annotate.JsonSerialize
                      (include=org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion.ALWAYS
              &lt;/annox:annotate&gt;
          &lt;/jaxb:bindings&gt;
       &lt;/jaxb:bindings&gt;
  </code></pre>
  
  <p>This also did not add any include part in the annotation.</p>