users@jaxb.java.net

Re: What would you like to see in tools.

From: Brett Porter <bporter_at_f2network.com.au>
Date: Thu, 12 Dec 2002 16:42:21 +1100

> Thanks for your feedback. I was aware of this problem, but what I found
> is that doing the correct dependency check is sometimes impossible. For
> example, a schema could pull in other schemas from other web servers
> (which don't give us timestamp information.)

I see your point. Still, for those that don't it should be ignored.
Perhaps the task could consider web schemas unchanged, unless there is a
flag present, in the task call. Alternatively, they could be downloaded
to a local area and compared the next time. I'm not sure this would
actually be more effecient though :)

> Also, the compiler needs to almost fully compile a schema to determine
> the exact set of files it is going to produce. So just doing an
> up-to-date check requires quite a lot of computation.

I guess it could take the most recent timestamp from the package as it
knows that - I know this assumes that the user hasn't put anything else
in the package though. I think this is close to what you have below though:

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

Thanks,
Brett