I have dozens and dozens .xsd
files that I want to auto-generate code for. A couple of the files have duplicate names that clash when I try to generate all of t
I have a half-way workaround solution to this, but it is very time intensive.
I had to create a separate
for every one of the files that has duplicate entries.
jaxb-mac
generate-sources
generate
true
my.company.mac
src/main/schema
mac-3.4.xsd
jaxb-stylesheet
generate-sources
generate
true
my.company.stylesheet
src/main/schema
mac-stylesheet-3.4.xsd
The
is important or only the first
will run and the rest will think that there is no need to run because I am generating into the same directory.
I would still like a less labor intensive solution to deal with the duplicates.
I think if I make the first master .xsd a separate module that builds into its own .jar file, I could then use the
tag and have it skip generating the same duplicate elements over and over, since they are identical in definition.
I have since decided to abandon XML if at all possible and JAXB completely. There are newer and better ways to parse XML and map it to objects as of this edit.