You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2002/09/02 15:29:00 UTC

Re: and Windows in Ant 1.5

On Wed, 21 Aug 2002, Westlin Peter <pe...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>