users@jaxb.java.net

Re: What would you like to see in tools.

From: Brett Porter <bporter_at_f2network.com.au>
Date: Mon, 16 Dec 2002 14:52:09 +1100

Hi,

This ant scriptlet doesn't appear to work with the 0.75 version:
file:/home/bporter/cvs/tr3/java/build.xml:496: The <xjc> task doesn't
support the nested "produces" element.

is this a new feature?

If you come up with a dependset alternative, I'd love to hear it. Not
sure if Ant 1.5 is a fair assumption for all though.

Cheers,
Brett

Kohsuke Kawaguchi wrote:
> <xjc target="src">
> <schema dir="src" includes="*.xsd"/>
> <!-- other dependencies -->
> <depends dir="src" includes="*.xsdmod"/>
> <produces dir="src/org/acme/foo" includes="*.java"/>
> </xjc>
>
> This is what I was going to attempt to do - hadn't got around to it
> though. Ant 1.5's dependset might actually do a better job - I'm not sure.
> What is the "xsdmod" line for - I don't quite understand that.
>
>
> Sorry for a confusing example. Indeed I think
>
> The intended semantics is that, upon the invocation, XJC list up files
> that match "depends" and "produces".
>
> (1) if no file matches "depends", an error is produced (on the
> assumption that the user wrote a wrong dependency set)
> (2) if no file matches "produces", XJC will go ahead and compile the
> schema (on the assumption that files are somehow cleaned up)
> (3) if a file in the "depends" set is newer than some file in the
> "produces" set, XJC will delete files that match "produces" and compile
> the schema.
> (4) otherwise it quits
>
>
> And thanks for the info of <dependset> --- I didn't know that there's
> such a task. I think what I had in my mind is exactly the same as this
> task (except that I can also control the invocation of XJC plus the
> deletion of files.)
>
>
> regards,
> --
> Kohsuke KAWAGUCHI
> Sun Microsystems kohsuke.kawaguchi_at_sun.com