Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all annotations of a certain type #61

Open
bcluap opened this issue Aug 16, 2020 · 1 comment
Open

Remove all annotations of a certain type #61

bcluap opened this issue Aug 16, 2020 · 1 comment

Comments

@bcluap
Copy link

bcluap commented Aug 16, 2020

Is it possible to use this plugin to remove all annotations of a certain type off all the generated classes. E.g. I want to ensure the generated source does not include @XmlSchemaType on any fields but don't want to have to do this on each and every field
I tried this:

<jaxb:bindings schemaLocation="service.xsd" node="/xs:schema">
<jaxb:bindings node="//xs:element">
<annox:removeAnnotation class="javax.xml.bind.annotation.XmlSchemaType" />
</jaxb:bindings>
</jaxb:bindings>

But get an error:
lineNumber: 17; columnNumber: 44; XPath evaluation of "//xs:element" results in too many (176) target nodes

@laurentschoelens
Copy link
Collaborator

You can defined the "not recognized" but existing attribute multiple="true" to get rid of the message and get the goal you want to do @bcluap (response more for reference, hope you're not waiting for more than 3 years for the fix 😄)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants