Solving this in a fully automated way sounds complicated to me. It would mean to extract the file creation dates of the previously generated pojo files and entering them into the new generation process.
A pragmatic way might be to introduce an intermediate directory for hbm files, say c:/intermediate. Then write an ant task that copies selected hbm files from ab to intermediate, using a
Code:
<input
message="Please enter date and time of last pojo generation"
addproperty last.gen
/>
<fileset ...>
<date datetime="last.gen" when="after"/>
</fileset>
Warning: This is just a sketch of a solution, not tested code.
Then run your hbn2java from intermediate.
Oh, and intermediate will have to be cleared before populating it, of course.