users@jaxb.java.net

Re: JAXB compilation plugin

From: Malachi de Ælfweald <malachid_at_gmail.com>
Date: Thu, 2 Mar 2006 14:45:58 -0800

On 3/2/06, Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_sun.com> wrote:

> Yes, although I think "includes" can be optional -- I think there's
> nothing wrong with defaulting @includes to "**/*.xsd" even for Ant.


hmmm... perhaps... but Driver.run() simply takes a directory with no
includes-concept.



> > The Maven2 approach uses many less attributes (and more tags) making the
> > code a little more readable... and I only define the xjc once, even
> though
> > it runs on probably 10 different submodules in different directories...
>
> Regardless of the syntax, with Maven you still get the same "define once
> & run for all modules" benefit, I think. You only need to define it at
> the top-level POM, and modules inherit it, IIRC?


With Maven it is easy to do (Maven2 more than Maven1) by only putting that
in the top-level POM. With Ant, I was only using one build.xml for all
subprojects and was using separate targets to setup the parameters for xjc.
Maybe that wasn't necessary. So long ago, hard to remember.



> > They are both XML. I think the primary difference comes to defining
> things
> > like filesets, classpaths, etc. And using more elements and less
> > attributes.
>
> If Maven folks don't like using attributes, then I guess reusing the Ant
> syntax really doesn't work very well.


In general, I like attributes -- but I think the normal Ant style takes it
overboard to the extreme making it difficult to read. I think two of the
primary goals should be readability and less effort.

I have no problem in using the Ant task in general -- I just really don't
want to be building up any classpaths, filesets, etc in my configuration.

Malachi