I\'m having a schema hierarchy like this:
common
|---legacy
| |---legacy.xsd xmlns=\"http://common/legacy\"
| |---other.xsd xmlns=\"http://co
Disclaimer: I'm the author of maven-jaxb2-plugin.
XJC derives packages from namespaces, so you (normally) can't generate several packages for one namespace. There are a few tricks with jaxb:class/@ref
but you don't want those as this may lead to all kinds of collisions.
So my suggestion would be to define multiple executions, one per distinct schema in the same namespace. You could use generatePackage
although I generally advise to define package mappings in bindings instead.
When doing multiple executions, make sure you use distinct generateDirectory
per execution.
By the way, why are you not comfortable with multiple bindings?