The problem with uptodate is that it can only have a single "target" file to check against. Look at the AntContrib's <outofdate> task.
The <outofdate> task can take more than a single target, and (as an added bonus), it can define the tasks to run if an outofdate condition is detected. No more setting a property then having a task check that property before it executes. Unless, you want to do that. The <outofdate> task can also set a property if an <outofdate> condition is detected. See <http://ant-contrib.sourceforge.net/tasks/tasks/outofdate.html>. On Nov 20, 2007 5:35 AM, Dimitris Mouchritsas <[EMAIL PROTECTED]> wrote: > Hi folks, I'm trying to create a condition task so as not to run a > hibernatedoclet target. > The problem is the target does not produce .hbm.xml files for all the > classes. So > for example if we have 3 classes in the src dir say, User.java, Account.java, > Login.java > the resulting files in the build dir might look like: > User.class > User.hbm.xml > Account.class > Account.hbm.xml > Login.class > > So not all classes have a hibernate configuration file. My problem is how > can I use uptodate > to check these? I've tried this: > <uptodate> > <srcfiles dir="${src.dir}"> > <include name="**/mypackage/domain/**/*.java" /> > </srcfiles> > > <chainedmapper> > <globmapper from="*" to="${domain.build.dir}" /> > <compositemapper> > <globmapper from="*.java" to="*.class" /> > <globmapper from=".java" to="*.hbm.xml" /> > </compositemapper> > </chainedmapper> > </uptodate> > > But I guess this mapper needs every class to have a corresponding .hbm.xml > > -- > Dimitris Mouchritsas > Computer Services > -- -- David Weintraub [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
