Closed glassfishrobot closed 8 years ago
Reported by ioannism
lexi said: Thanks for the report.
ioannism said: You're welcome, let me know if you need any more info.
jesseplymale said:
I had a similar issue, but the annotations that I was trying to annotate on the JAXB class were not custom annotations that I had defined, but rather just annotations that were from a library (Jackson) that was not part of the Java API. Turns out that Maven was not using the project dependencies (of which Jackson was a part) in the classpath when running XJC via the maven JAXB plugin. When I added a
Definitely seems like a shortcoming of the Maven JAXB plugin, that it does not put the project dependencies on its classpath during code generation.
lexi said: http://jira.highsource.org/browse/JIIB-55
lexi said: Continued in https://github.com/highsource/jaxb2-annotate-plugin/issues/20.
This issue was imported from java.net JIRA JAXB2_COMMONS-32
Marked as duplicate on Thursday, December 24th 2015, 1:08:34 am
Given the following annotation (defined in the same project along with ExistingCustomerValidator class )
and the following jxb customisation
I get this when I generate my sources ( it's a Maven project)
Other JSR-303 annotations work fine. I believe that the problem lies in the fact that the xjc plugin does not consider the project's classpath and therefore won't compile for Annotations that have class references in the main project. A workaround is to create a separate maven project and use it as a dependency but this is Ugly.