users@jaxb.java.net

Re: Use of <appinfo> with JAXB

From: Ed Mooney <Ed.Mooney_at_sun.com>
Date: Thu, 10 Jul 2003 13:53:45 -0400

Hi Jerald,

My point is that it does make a difference, at least in my environment.

Regards,
--
Ed Mooney         |Sun Microsystems, Inc.|Time flies like
Java Web Services |UBUR02-201            |an arrow, but
Ed.Mooney_at_Sun.COM |1 Network Drive       |fruit flies like
781-442-0459      |Burlington, MA  01803 |a banana. Groucho
Pratt, Jerald wrote:
> Ed,
>
> I have a similar set up and my xjc task does work.  Its just the
> extension="true" attribute that doesn't seem to be making a difference.  The
> schemas that I'm using have some abstract elements which require me to use
> the -extension argument to the xjc command.  Supposedly this is supported in
> the xjc ant task with an extension="true" attribute to the xjc task.  But
> adding this doesn't seem to make a difference when running ant as it does
> when I simply run xjc from the command line.
>
> Jerald
>
>
[ ... ]



diff without-extension.xml with-extension.xml
16c16
< <xjc schema="gml/gmlBase.xsd" target="."/>
---
>         <xjc schema="gml/gmlBase.xsd" extension="true" target="."/>
ant -f without-extension.xml
Buildfile: without-extension.xml
compile:
      [xjc] Compiling file:/C:/cygwin/home/emooney/sandbox/jaxb-ri/jaxb-interest/jerald.pratt_at_ngc.com/gml/gmlBase.xsd
      [xjc] [ERROR] In "strict" mode, the following schema feature is not allowed (See App E.2).Use the "-extension" switch:
      [xjc]     "abstract" attribute of <element> is not supported
      [xjc]   line 38 of gmlBase.xsd
BUILD FAILED
file:c:/cygwin/home/emooney/sandbox/jaxb-ri/jaxb-interest/jerald.pratt_at_ngc.com/without-extension.xml:16: unable to parse the schema. Error messages should have been provided
Total time: 40 seconds
ant -f with-extension.xml
Buildfile: with-extension.xml
compile:
      [xjc] Compiling file:/C:/cygwin/home/emooney/sandbox/jaxb-ri/jaxb-interest/jerald.pratt_at_ngc.com/gml/gmlBase.xsd
      [xjc] Writing output to C:\cygwin\home\emooney\sandbox\jaxb-ri\jaxb-interest\jerald.pratt_at_ngc.com
BUILD SUCCESSFUL
Total time: 1 minute 12 seconds
Compilation finished at Thu Jul 10 13:47:59