users@jaxb.java.net

Re: Generate java packages to reflect structure of schema tree?

From: Kenny MacLeod <kennym_at_kizoom.com>
Date: Sun, 04 Nov 2007 11:15:49 +0000

when you say "several levels", what do you mean by that? is the schema
all in one namespace?


Farrukh Najmi wrote:
>
> I have a fairly large schema directory tree with several levels to
> compile. Each directory has numerous files.
> I would like to generate the bindings such that it generates java
> packages reflecting the directory structure of
> my schema tree.
>
> Is there a way to accomplish this more efficiently than to:
>
> * compile each directory separately and specified a package for each
> directory (vbery tedious and verbose in maven)
> * Specify a package customization for each schema file (very
> painfully tedious)
>
> What would be nice is some mode in xjc that just does the right thing by
> taking the specified package name and map it to base package (fixing any
> invalid java names in the process) and then for each sub-directory map
> it to a sub-package corresponding to the sub-directory name.
>
> Shall I file an RFE on this? What is the best approach for this problem
> using the latest JAXB release. TIA.
>