> > <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