users@jaxb.java.net

Re: maven 2 plugin, multiple schemas, single binding file

From: Kostis Anagnostopoulos <ankostis_at_gmail.com>
Date: Thu, 19 Apr 2007 11:55:20 +0300

Hi Stephen,

Would you mind to try the other m2 plugin, at:
  https://maven-jaxb2-plugin.dev.java.net/

The plugin's setup is not very different to the one you are currently using
(ie, instead of 'exludeSchemas', 'schemasExcludes').

, but it offers some more capabilities, among them, it performs
up-to-date-check (to speed-up execution), and provides better
debugging mesages.


Regards,
  Kostis

On 4/19/07, Stephen Parker <stevesp4644_at_yahoo.com> wrote:
> I have multiple schemas in a single directory that I wish to bind. I also have a single binding file for specifying the package locations of the generated code for each schema.
>
> If I do
>
> xjc.bat *.xsd -d someDir/java -b binding.xjb
>
> all is fine. However the maven plugin seems to do the schemas individually using the same binding.xjb for each. As the binding.xjb contains entries that are not relevant to every schema I get an error:
>
> [ERROR] [ERROR] "file:/C:/Finesse/trunk/schemas/SomeOther.xsd" is not a part of this compilation. Is this a mistake for "file:/C:/Finesse/trunk/schemas/Some.xsd"?
> [ERROR] line 10 of file:/C:/Finesse/trunk/schemas/binding.xjb
>
> At this point it is trying to bind Some.xsd; Some.xsd and SomeOther.xsd are present and have an entries in the binding.xjb:
>
> <jxb:bindings schemaLocation="Some.xsd" node="/xs:schema">
> <jxb:schemaBindings>
> <jxb:package name="com.foo.somepackage"/>
> </jxb:schemaBindings>
> </jxb:bindings>
>
> <jxb:bindings schemaLocation="SomeOther.xsd" node="/xs:schema">
> <jxb:schemaBindings>
> <jxb:package name="com.foo.someotherpackage"/>
> </jxb:schemaBindings>
> </jxb:bindings>
>
> This seems very similar to the problem reported in issue 212 but the latest plugin does not fix the problem.
>
> Is there any way around this? Could the error be replaced with a warning (urrgh)?
>
> Thanks,
>
> Steve.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>