users@jaxb.java.net

Using the maven plugin for multiple schemas with external customization

From: Joost Cassee <joost_at_cassee.net>
Date: Tue, 11 Jul 2006 10:37:13 +0200

There seems to be a snag with the way the maven plugin runs xjc. I have
a project with two (unrelated) XML schemas, both of which I want to
customize with an external binding file.

However, the plugin seems to compile each schema separately, but uses
both binding files. This causes the following error:

[INFO] [jaxb:generate]
[INFO] Compiling file:<schema1>.xsd
[ERROR] [ERROR] "file:<schema2>.xsd" is not a part of this compilation.
Is this a mistake
for "file:<schema2>.xjb"?
[ERROR] line <> of file:<schema2>.xjb

(And yes, 'verbose' confirms the task finds both schemas.)

Does anyone know of a way around this?


Thanks,

Joost