users@jaxb.java.net

Re: episode issue

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Sat, 24 May 2008 14:19:34 -0400

Hi Kohsuke,

I am wondering how the seperate compilation feature finds the
customization file used for a schema that was compiled separately and is
a dependency for the schema being compiled. My C.jar has the
customization for schema C in a file at the top level of C.jar and name
binding.xjb. Of course if that is not the expected place then that would
explain why the customization is not being applied when compiling A.jar.

Thanks for any explanations.

Farrukh Najmi wrote:
>
> I am using maven-jaxb-plugin to generate JAXB bindings for a schema
> A.xsd.
>
> The schema imports two other schemas B.xsd and C.xsd both of which
> have been separately compiled
> via JAXB episode mechanism.
>
> The schema A.xsd defines a new type whose base type is defined in C.xsd.
>
> For some reason I get the following error:
>
> [ERROR][ERROR] Property "XXX" is already defined. The line number is
> in the file C.xsd
>
> This error is due to a name conflict between an attribute name and an
> element name and the compilation for C.xsd already has a customization
> to handle this conflict.
>
> So I have two questions:
>
> 1. Why is C.xsd apparently being compiled when I specified an episode
> for it:
>
> <plugin>
> <groupId>com.sun.tools.xjc.maven2</groupId>
> <artifactId>maven-jaxb-plugin</artifactId>
> ...
> <configuration>
> ....
> <episodes>
> <episode>
> <groupId>my.project</groupId>
> <artifactId>B</artifactId>
> </episode>
> <episode>
> <groupId>my.project</groupId>
> <artifactId>C</artifactId>
> </episode>
> </episodes>
> </configuration>
> </plugin>
>
> 2. Even if schema C is being recompiled by XJC why is its binding.xjb
> file not being read from within C.jar
>
> What am I doing wrong and how can I fix this strange problem? TIA for
> your help.
>


-- 
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com