Everything was working fine with my maven enabled project.
But when I rebuilt it today tests started to fail withe error
the property or field count on the class org.musicbrainz.mmd2.DiscList
is required to be included in the propOrder element of the XmlType annotation
no code had changed so I assume something has changed in the eclipselink MOXy 2.5 snaphot jar.
I could resolve it by removing the offending mapping from oxml.xml
<java-type name="DiscList">
<java-attributes>
<xml-element java-attribute="count" name="disc-count"/>
</java-attributes>
</java-type>
but then my resultant json is incorrect (because I need to rename count to disc-count).
I can fix it my modifying my DiscList.java class and adding to propOrder as suggested by the exception
i.e
from
@XmlType(name = "", propOrder = {
"disc"
})
to
@XmlType(name = "", propOrder = {
"disc","count"
})
but that is a pain because these classes are generated automatically from a schema, I don't want to have to manually edit them every time the schema changes.
So the question really is what has changed in MOXy, and has this change introduced a bug ?