Skip to main content

How to add copyright javadoc to all classes generated from XSD?

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2003-11-10


I need to add a copyright comment at the top of every class generated by XJC from my XSD schema without adding to each complexType declaration. I tried to different ways without any success. My latest attempt was with a customer JAXB binding as follows:

/* Copyright */ ]]>

This, of course, complains that "name" attribute is missing on element.

Does anybody know if I can accomplish this by modifying either the XSD or the XJB files?