I have a simple question that I could not answer myself by looking at 
documentations and trying to solve it different ways.

My build lifecycle is :
I use the jaxb maven plugin to generate sources in a custom folder, directly in 
my src/main/java/custompackage.
I post process the generated sources by further code generation to enrich the 
classes with various improvements.

This is fine tests are ok.


But when I mvn install the source plugin regenerates the sources :

[INFO] >>> source:3.2.0:jar (attach-sources) > generate-sources @ 
VariConfiguration >>>
[INFO]
[INFO] --- jaxb:4.0.8:generate (generate-configuration-schema) @ 
VariConfiguration ---


I really think this is not wanted behavior as it is duplicate code generation 
and I'd like to avoid that.

I tried various settings but unsuccessfully.

One thing that was working was to call directly mvn sources:jar-no-fork, but as 
soon as I call mvn install the default behavior triggers and call again the 
generate-source.
Maybe this is caused by the fact that I generate the code in some custom 
folders (directly in src/main/java/custompackages)?

Thanks for any help
Gregory

Reply via email to