users@jaxb.java.net

Episodic compilation against jar file

From: Raymond Wold <raymond.wold_at_teletopia.com>
Date: Tue, 27 Mar 2007 12:59:21 +0200

I would like it if xjc looked in the jar file for the schemas the episode file
  inside the jar file refers to, is that possible?

I spendt some hours now trying to get episodic compilation to work first with
my own files, then the examples on
http://weblogs.java.net/blog/kohsuke/archive/2006/09/separate_compil.html
before realizing the schemaLocation attribute was the issue. In the example
from KK's blog, http://alice.org/a.xsd obviously has no schema, and you get
"[ERROR] src-resolve: Cannot resolve the name 'a:myType' to a(n) 'type
definition' component." which in itself is less than optimal, a "could not
find imported schema source" or similar would be better.

I've tried specifying the schemaLocation using a jar: scheme, but then xjc
balks on the original files, since the files isn't packaged yet. Besides, the
location and filename of the jar might change, and the schemaLocation would be
useless. I don't think it's a good idea to rely on the schemaLocation
attribute at all to find imported schemas.