I use JAXB to create classes for a schema that imports other schemas. I am using maven and have configured the maven-jaxb2 plugin to use dependencies as episodes to skip generation classes for imported schemas.
However, JAXB continues to generate ObjectFactories for imported schemas, which leads to class conflicts and improper runtime behavior.
As a workaround, I use maven-antrun-plugin to clean up these additional files. Is there a better way to avoid this problem?
source
share