Hey Jurrie,
>From context you shared it seems you have an complete maven build. In
fact it sounds to me like an embedded build with Yocto. ;-)
If you do maven build then it also means that you can use *any* of
available maven plugin to do post-processing of generated sources files.
Long time ago there was maven-code-replacer-plugin, there are also ant
tasks which you can use after sources are made.

By this way you will have consistent checksums and avoid troubles with
CXF modifications.

Best,
Łukasz

On 18.03.2021 20:01, Jurrie Overgoor 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?
> 
> - 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.
> 
> - 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?
> 
> 
> Thanks in advance for your replies.
> 
> With kind regards,
> 
> Jurrie
> 
> 
> PS: For more information on reproducible builds, see
> https://reproducible-builds.org/
> 
> 

Reply via email to