Xjc generation of a xs:choice produce code that is not always the same. The difference is in the ordering of the @XmlElementRefs in the generated Java class.
This is causing some pain with the cache and change detection. The generated code should always be the same for the same Xml Schema.
Xjc generation of a xs:choice produce code that is not always the same. The difference is in the ordering of the @XmlElementRefs in the generated Java class. This is causing some pain with the cache and change detection. The generated code should always be the same for the same Xml Schema.
When generating from :
I have had :
or :
generated. Gradle cache considers (correctly) that those 2 are not the same and retrigger all the downstream tasks.
Expected behaviour : The generated code should always be the same, probably in the order of the original document.
Sample gradle project exposing the issue : xjc-choice-order.zip
run gradlew xjc at the root and the 2 files :
Are not the same.