Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] opinion wanted: check in generated code or not vs.copyright notice

Thomas Menzel wrote:


I just wanted to get your opinion on this subject:

we have some generated code (JAXB) that we use in the SMILA project.

in the past we have just checked in these source files in our non-eclipse projects as they change infrequently and are needed for the developers to write their code.

now, at eclipse we need to provide a proper copyright notice but unfortunately the code generator wont let us add a custom jdoc where we could place that.

modifying the generated source files to add the notice is cumbersome and probably tends to get forgotten.

I answered this in the EAC bug, but you can use a custom JAXB Plugin for the XJC that will allow you to insert code into the generated classes. Also, if you add the Eclipse copyright header to the XML Schemas, as xsd:annotation\xsd:documentation element under the xsd:schema you should get those comments added. See the bug report for how to use the XJC plugins and the code insertion plugin in particular.


Back to the top