I have been searching the internet for a reason why JAXB generated classes have protected members (all of them, regardless of inheritance).
I would like the members to be private instead.
My search has come up empty.
I have normal xsd files which are converted into Java classes using Maven and JAXB. Ideally the generated members should be private but I cannot find a way to achieve this.
Is there a way to modify this default behaviour?
Well, I am going to respond to my own question.
Creating a plugin was the right way to go.
I wrote the following plugin and it seems to work.
Feel free to use this if you want.