users@jaxb.java.net

RE: supressing class generation with xjc

From: Jerry Lacy <jlacy_at_ssglimited.com>
Date: Fri, 4 Feb 2005 14:41:06 -0600

Kohsuke,

Thanks for the reply. I figured that this was not supported but I thought I
would ask anyway.

It would seem reasonable to support an XJC command line option to do one of
the following:

1) suppress the generation of classes that can be located in the classpath
(using the xjc -classpath argument). In my scenario, including the .jars
that comprise my framework distribution in the -classpath would do the
trick.
2) specify one or more packages to suppress. In my case, since each of my
namespaces maps to a unique package, I could suppress all namespaces within
the base framework.

I think this would be a very useful feature for a future release.

Thanks,
Jerry

-----Original Message-----
From: Kohsuke Kawaguchi [mailto:Kohsuke.Kawaguchi_at_Sun.COM]
Sent: Friday, February 04, 2005 12:35 PM
To: users_at_jaxb.dev.java.net
Subject: Re: supressing class generation with xjc

Jerry Lacy wrote:
> The problem I am having has to do with packaging the framework for
distribution.
> Ideally, I would compile the framework schemas and include the resulting
JAXB
> classes into my framework.jar distribution. The user of the framework
would
> then define the project specific namespace and schema (which would
<include> the
> framework schema) and compile it into their project using xjc without
having xjc
> regenerate all of the framework JAXB classes (since they already are
present in
> framework.jar). I do not see a way to accomplish this since, when the
user
> executes xjc to compile the project specific schema, xjc will regenerate
the
> framework JAXB objects as well.

The current way of doing this is to instruct users to:

        1. compile their schemas
        2. delete a part of the generated stuff that corresponds to
           the framework schema

If you can think of an easier way to do so, I'm very interested in
incorporating that into JAXB RI 2.0.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net