I currently have two projects, each producing their own .jar file. In
project one, I have two schema files, A.xsd and B.xsd. Each of these are
described in an episode file. The episode file is generated by the M2
plugin so it is nothing special. In project two I have a schema file A1.xsd
that imports A.xsd but not B.xsd. Project2 will not compile correctly
because I am not also importing B.xsd. I get the following error.
/META-INF/sun-jaxb.episode[11,86]: com.sun.istack.SAXParseException2: SCD
"x-schema::tns" didnt match any schema component
Is it possible to consume only one of the XSD files from project1 and not
the other? If so, is this something that I need to change in project1's
episode file or is it something that needs be changed when generating
project2? If not, why is this not allowed?
I know the workaround is to place each of the XSDs in their own project with
their own episode file but this causes a bit of bloat in the number of
projects to maintain.
Thanks ahead of time.
Patrick
On second thought, here is the episode file modified a bit to reflect the
above scenario...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bindings version="2.1" xmlns="
http://java.sun.com/xml/ns/jaxb">
<!--
This file was generated by the JavaTM Architecture for XML Binding(JAXB)
Reference Implementation, vhudson-jaxb-ri-2.1-520
See
http://java.sun.com/xml/jaxb http://java.sun.com/xml/jaxb
Any modifications to this file will be lost upon recompilation of the source
schema.
Generated on: 2008.07.14 at 11:46:09 AM CDT
-->
<bindings scd="x-schema::tns" xmlns:tns="
http://www.xxx.org/A/object">
<schemaBindings map="false">
<package name="org.xxx.a.object" />
</schemaBindings>
<bindings scd="~tns:a_target">
<class ref="org.xxx.a.object.ATarget"/>
</bindings>
<bindings scd="~tns:a">
<class ref="org.xxx.a.object.A"/>
</bindings>
</bindings>
<bindings scd="x-schema::tns" xmlns:tns="
http://www.xxx.org/B/object" >
<schemaBindings map="false">
<package name="org.xxx.b.object" />
</schemaBindings>
<bindings scd="~tns:scmr_type">
<class ref="org.xxx.b.object.BType"/>
</bindings>
<bindings scd="~tns:scmr_history">
<class ref="org.xxx.b.object.BHistory"/>
</bindings>
<bindings scd="~tns:scmr">
<class ref="org.xxx.b.object.B"/>
</bindings>
</bindings>
</bindings>
--
View this message in context: http://www.nabble.com/Importing-single-.xsd-file-from-JAR-project-with-multiple-.xsds-tp18466997p18466997.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.