<oops>
I've asked for a more general form of uptodate that compares
two filesets. I've implemented a patch to Ant 1.3a that
provides the capability, though the more I think about it
the more I want conditions and conditional execution to be
more explicitly modeled.
With the updated uptodate, you can do something like, which
is probably analagous to your situation of SQL generated java.
<target name="idl2javacheck" >
<mkdir dir="${generated.java.root}" />
<uptodate property="idl2java.uptodate" >
<srcfiles id="idl.files" dir="${idl.root}" includes="APEC.idl" />
<targetfiles id="generated.java.files" dir="${generated.java.root}"
includes="**/*.java" />
</uptodate>
</target>
<target name="idl2java" depends="idl2javacheck" unless="idl2java.uptodate"
>
<execon executable="${vbroker.home}/bin/idl2java.exe" parallel="true" >
<arg value="-package" />
<arg value="${stub.package}" />
<arg value="-root_dir" />
<arg value="${idl.java.out}" />
<arg value="-Id:/Cvsdir/Svc/IDL" />
<arg value="-idl2package dec com.eidea.dec.stub" />
<arg value="-no_comments" /> <arg value="-no_examples" />
<fileset refid="idl.files" />
</execon>
</target>
-----Original Message-----
From: Steve Wilkinson [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 2:56 PM
To: '[EMAIL PROTECTED]'
Cc: Steve Wilkinson
Subject: Help with conditional execution with targets
My application generates Java code based on SQL files. I would like to
determine if a change was made to one of the SQL files and if there was
re-generate the Java code. Can someone give me some direction?
uptodate takes a single target file rather than a fileset, so I don't see
that I can use it. I can create a jar file of the SQL files, but I wanted
to avoid doing that. Does anyone else have any other ideas?
Thanks in advance.
-------------
Steve Wilkinson
NETdelivery.com
p: 303-245-7378
x: 303-245-9122
SourceFileScanner.java
UpToDate.java