users@jaxb.java.net

episode issue

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Fri, 23 May 2008 15:20:14 -0400

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