ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: <uptodate> and Windows in Ant 1.5
Date Mon, 02 Sep 2002 13:29:00 GMT
On Wed, 21 Aug 2002, Westlin Peter <pewei@wmdata.com> wrote:

> <target name="ejbdoclet" depends="prepare">
>   <uptodate property="xdoclet.uptodate" srcfile="${ejb.weblogic.file}"
>             targetfile="${ejb.generic.file}" value="fisk"/>
>   <antcall target="ejbdoclet-run" inheritRefs="true" />
> </target>

>    <target name="ejbdoclet-run" unless="xdoclet.uptodate">
> 
> ejbdoclet-run always run even if one of the files does not exist...

<uptodate> will execute and set the property xdoclet.uptodate to fisk
if ${ejb.generic.file} is as new or newer than ${ejb.weblogic.file} -
otherwise it will not set the property at all.

If you throw in an <echo> there (before the <antcall>), will it say
that xdoclet.uptodate has been set?  If not, consult Ant's -debug
output to see why it thinks the file is out of date.

May I also suggest to use

<target name="ejbdoclet-check" depends="prepare">
  <uptodate property="xdoclet.uptodate" srcfile="${ejb.weblogic.file}"
            targetfile="${ejb.generic.file}" value="fisk"/>
</target>

<target name="ejbdoclet" unless="xdoclet.uptodate"
        depends="ejbdoclet-check">
  ... your stuff from your original ejbdoclet-run target here ...
</target>

instead of your construct?  It will be more explicit (because it
states its dependencies better) and a lot faster (depending on the
size of your build file).

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message