Jonathan Johnson wrote:
> According to the docs (
> http://java.sun.com/webservices/docs/1.6/jaxb/xjc.html ) the order of the
> XSD and XJB files on the command line don't matter --> ie: I read this to
> mean that xjc just requires listing all the XJB files and doesn't require
> specifying which XJB files go to which XSD files.
Correct.
> [jon] I thought there was a correlation between each xsb and xsd file, but
> there isn't. This makes it easy then. A technical problem here is XJC2Task
> only has a setBinding and a setSchema method. For each schema the plugin
> finds it calls setSchema and setBinding. With this API how does one call
> setSchema then setBinding with multiple binding files? There are
> addConfiguredXXX methods. Perhaps this is what they are for?
I can expand XJC2Task to allow you to add individual files.
> So, a couple questions:
> 1) Feasibilty of modifying XJC to allow a -bd (bindingDirectory) that
> would do a recursive subdirectory search just like it does for XSDs
> [jon] Yes - this needs to be added.
One problem for this is that we don't have a consistent naming
convention for binding files. For example, I personally use ".jaxb",
while I saw other people use ".xjb", ".jxb", and etc.
But maybe it's time to decide on one and stick to it for the ease of use.
I'll go ahead and support recursive search in -binding in XJC CLI.
> 3) easiest way for the user to specify multiple ignore options... like
> "**/eld/**" to ignore subdirectories or simply "oldSchema.xsd"
> [jon] Yes - the binding and schema should both have include and exclude
> regular expressions. All four would assume 'schemaDirectory' as the root.
You see, I told you, we should be using a FileSet!
(Sorry, I know, I couldn't resist...)
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com