This looks like a regression, can you file a bugzilla
report, please.
Peter
On 10/4/07, DJ Kingsolver <[EMAIL PROTECTED]> wrote:
> Hi all,
> I've been an Ant user for near a year, but this my first time posting to
> this group. Thanks in advance for any help you can provide.
>
> In a nutshell, the problem I'm having is this: I have several build files
> that run flawlessly under Ant 1.6.5, but they don't work correctly under Ant
> 1.7.0
>
> I've narrowed the problem down to this target:
>
> <!-- cache the image files -->
> <!-- the images.nocache attribute should be set from command line to
> disable -->
> <target name="cache-images" description="Cache the images." unless="
> images.nocache">
> <!-- delete the unchanged files -->
> <delete verbose="true">
> <fileset dir="${build.images.dir}">
> <include name="**/*.jpg" />
> <include name="**/*.JPG" />
> <not>
> <modified seldirs="false"
> algorithm="${cache.images.algorithm}">
> <param name="cache.cachefile" value="${cache.images.dir}/${
> cache.images.file}" />
> <param name="algorithm.algorithm" value="${
> cache.images.algorithm.algorithm}" />
> </modified>
> </not>
> </fileset>
> </delete>
> </target>
>
> Under 1.6.5 when I run the above code the following happens:
> Prior to the "cache-images" another target copies files (jpgs in this case)
> to a folder, let's call this 'build'.
> "cache-images" then deletes any .jpg files in the build folder that have NOT
> been modified, thus only new or modified files remain.
> Finally, another target moves the remaining, e.g. new or modified, files in
> 'build' to an other folder, 'dist'.
>
> Under 1.7.0 the following happens:
> Prior to the "cache-images" another target copies files (jpgs in this case)
> to a folder, let's call this 'build'.
> "cache-images" then deletes ALL .jpg files in the build folder, seemingly
> ignoring files that should be preserved because by the modified selector.
> Finally, another target moves should move any remaining, e.g. new or
> modified, files in 'build' to an other folder, 'dist', however all files
> have been deleted so there are none to distribute.
>
> It seems to me that the problem may lie in the interaction between <delete>
> and the <fileset>/<selector> combo because if I change the <delete> task to
> a <copy> the expected <fileset> is then copied. Are there any known issue
> or anything that has changed with <delete> between 1.6.5 and 1.7.0?
>
> Thanks,
> DJ
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]