DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=43574>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43574 Summary: Unexpected behavior from the interaction between <delete> and <not><modified></not> Product: Ant Version: 1.7.0 Platform: All OS/Version: Linux Status: NEW Severity: regression Priority: P2 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] This problem has been identified while migrating from 1.6.5 to 1.7.0. I have a set of build files that worked as expected under 1.6.5, but behave differently under 1.7.0. The problem is generalized into three test cases below, case 3 shows this particular failure in detail, cases 1 & 2 serve to show that this problem only seems to manifest while using <delete>. The following selector is defined for the next three test cases. This selector should find files that have not been modified. It will update the cachefile with the latest checksum. This selector should only find files that exactly match, and only after it has reference to those files in the cachefile. Conversely it should not match new or revised files. <selector id="cache.selector"> <not> <modified update="true" seldirs="false" cache="propertyfile" algorithm="digest" comparator="equal"> <param name="cache.cachefile" value="${build.images.dir}/cache/cache.properties"/> <param name="algorithm.algorithm" value="MD5"/> </modified> </not> </selector> The difference among cases 1,2, and 3 is the use of the <copy>, <move> and <delete> tasks respectively. All other parameters are the same. Case 1: Description: copy unmodified files to a temporary folder, overwriting Expected: On first run, when no cachefile is present, should copy nothing On 2nd through n passes, should copy all files that were logged from the first run What happens under 1.7.0: works as expected <copy verbose="true" todir="${build.images.dir}/temp" overwrite="true"> <fileset dir="${build.images.dir}"> <include name="*.jpg" /> <selector refid="cache.selector" /> </fileset> </copy> Case 2: Description: move unmodified files to a temporary folder, overwriting Expected: On first run, when no cachefile is present, should move nothing On 2nd pass, should move all files that were logged from the first run On 3rd pass, should have no files to move What happens under 1.7.0: works as expected <move verbose="true" todir="${build.images.dir}/temp" overwrite="true"> <fileset dir="${build.images.dir}"> <include name="*.jpg" /> <selector refid="cache.selector" /> </fileset> </move> Case 3: Description: delete unmodified files Expected: On first run, when no cachefile is present, should delete nothing On 2nd pass, should delete all files that were logged from the first run On 3rd pass, should have no files to delete What happens under 1.7.0: deletes all files on the first run. This problem did not exist in 1.6.5 and prior <delete verbose="true"> <fileset dir="${build.images.dir}"> <include name="*.jpg" /> <selector refid="cache.selector" /> </fileset> </delete> -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]