highsource / jaxb2-annotate-plugin

Add arbitrary annotations to JAXB classes.
Other
72 stars 28 forks source link

@com.fasterxml.jackson.annotation.JsonTypeInfo in xjb file not adding annotations to jaxb classes. #58

Open dileepg2k opened 4 years ago

dileepg2k commented 4 years ago

@com.fasterxml.jackson.annotation.JsonTypeInfo in xjb file not adding annotations to jaxb classes though build is success. Please let me know how to add this annotation to jaxb classes trough binding.

    <jaxb:bindings node="//xs:element[@name='Class']">
            <annox:annotate target="field">
                @com.fasterxml.jackson.annotation.JsonTypeInfo(property = "class")
            </annox:annotate>               
           </jaxb:bindings>

Below plugin is used.

org.jvnet.jaxb2.maven2
            <artifactId>maven-jaxb2-plugin</artifactId>