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.