Hi Jurrie, Please see my comments below inline Best Regards
Freeman On Thu, Mar 18, 2021 at 3:01 PM Jurrie Overgoor < [email protected]> wrote: > Hello everyone, > > I created https://issues.apache.org/jira/browse/CXF-8436. This is about > getting generated code that is "reproducible-build-compatible". This > would mean having @Generated annotations without a date in them. > > CXF is the last part in our build that's preventing us from being a > fully reproducible build. So I set out to tackle this :) > > I am currently working on a solution where I have correct @Generated > annotations in wsdl2java generated code, and also in xjc generated code. > It involves two pieces: > > The first piece is a new project in cxf-xjc-utils, which is a new plugin > for xjc. It allows for a command line flag > "-Xmark-generated-without-date". The plugin is actually an extension of > com.sun.tools.xjc.addon.at_generated.PluginImpl (which is shipped with > jaxb-xjc-2.3.2.jar). This is the plugin responsible for creating > @Generated annotations *with* the 'date' parameter. My code calls the > superclass, and then removes the 'date' part by duplicating the > @Generated annotation. (This is because you can not modify a > JAnnotationUse once it's created.) > > The second piece is additional code to codegen-plugin, wsdlto/core, > wsdlto/databinding/jaxb and wsdlto/frontend/jaxws. This code allows for > a command line flag "-mark-generated-without-date". This command line > flag does two things: > - Wsdl2java generates the correct @Generated annotations, without 'date'; > - It calls xjc with "-Xmark-generated-without-date" > > > Now for my questions: > > - Is this train of thought something you agree on? If this were a pull > request (two actually), would you accept it? > Sounds promising. You can send PR when you are ready and the community can discuss it. > > - Is it ok to have the two command line flags be named differently? I > followed existing JAX-B plugin code and prefixed my command with an 'X'. > I did not do this for wsdl2java. > I believe it's OK. for the xjc plugin, we should follow the -X pattern for sure > > - What should this new JAX-B project be called? I currently named it > "reproducible-build", but maybe something like > "mark-generated-without-date" is more appropriate? > I prefer "mark-generated-without-date" because it's the general purpose for it, whereas "reproducible-build" is too specific to your own use scenario. > > > Thanks in advance for your replies. > > With kind regards, > > Jurrie > > > PS: For more information on reproducible builds, see > https://reproducible-builds.org/ > > >
