Thanks a lot for your help ! Your Ant task concern is pretty close to my IDL task.
> I think I faced the same kind of issue when I developed a <jaxb> task > (posted to BugZilla). To know whether generation or re-generation is > necessary, you do need to know which files will be generated. This usually > requires intimate knowledge of the process wrapped in a task. In my case, it > would have required parsing a schema file, and understand all various ways > the class generation was going to affect which files are generated > (renaming, etc...). This is too complex. > > I ended up looking a posteriori at what files had been generated (in an > empty dir), recording (caching) their timestamps (and sizes and checksums). > Next time, if the source document is newer than any of the files generated, > re-generation needs to happen again. But also, if the source document has > not changed, but any of the generated files had been modified, or is missing > (or if I cannot find the cache file), then re-generation is also necessary. I like this idea, but how did you figure out were to create the empty dir ? Is there somekind of temporary location used by Ant ? My current idea would be to record into a temporary location a serialized hashtable of generated files (which would be created at the first build) and then use the Ant classes to check for uptodate. Erik.