Greetings all,
I have recently run into a small problem with the <uptodate> task.
I have a script which looks something like this….
<target name="copy_dependencies" description="Copies dependencies to the lib folder" >
<uptodate property="dependencies.uptodate" verbose="true">
<sourcefiles>
<include name="SourceFolder1\**\*" />
<include name="SourceFolder2\**\*" />
</sourcefiles>
<targetfiles>
<include name="lib\**\*" />
</targetfiles>
</uptodate>
<ifnot test="${dependencies.uptodate}">
<copy todir="lib" verbose="true">
<fileset basedir="SourceFolder1">
<include name="**\*" />
</fileset>
</copy>
<copy todir="lib" verbose="true">
<fileset basedir="SourceFolder2">
<include name="**\*" />
</fileset>
</copy>
</ifnot>
</target>
Unfortunately, while this works well when files in SourceFolder1 and SourceFolder2 which exist in "lib" are updated, if the file does not already exist in the "lib" folder dependencies.uptodate is still set to True.
Is this a bug, or am I misusing <uptodate>? If I'm misusing it, is there any way to accomplish what I need, without *requiring* that files are always copied?
Regards,
Richard