-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add more options to exclude classes from the default JAXBContext #31940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your pull request!
From my side, I have the same comments as in #31882 (reply in thread).
This comment has been minimized.
This comment has been minimized.
What would you think of dropping pattern matching (
It would avoid collision when exclusion of a User class would incidentally also exclude a UserAccount class. |
Good idea! |
fe9e55f
to
de7d332
Compare
I've committed these changes. I should also rebase and squash my two commits and force-push into single one, shouldn't I? |
Yes, please |
198aabb
to
2ab2cf5
Compare
Done, thanks for your patience. |
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Following this discussion, I would like to thank @Sgitario for his kind assistance and his invitation to try to contribute.
Here is a pull request with:
quarkus.jaxb.exclude-packages
to exclude classes from given packages from the default JAXBContextquarkus.jaxb.exclude-pattern
to exclude classes whose names matches the pattern from the default JAXBContextTo reply to @Sgitario 's comment from the discussion:
I'm thinking of cases such as classes named User and UserAccount, a startWith matching may not work as intended, if only the User class is to be excluded for some reason.
The motivation behind pattern matching is to provide adequate tooling for developer using xjc with third-party XSD. The sheer number of classes can grow up pretty quickly and one have little control over them.
I agree having both exclude-packages and pattern matching is somehow redundant. Pattern matching can easily exclude packages.
Of course, I will proceed with what ever option you prefer. :)