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=39122>. 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=39122 Summary: uptodate treats an outdated target as up to date Product: Ant Version: 1.6.5 Platform: Macintosh OS/Version: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] uptodate does not seem to handle target directories properly. It will incorrectly determine that a generated directory with an out-of-date timestamp is actually up to date. Example script: <project name="test-uptodate"> <target name="update-source" > <touch file="source" /> <echo message="Source updated. Target is out of date." /> </target> <target name="update-target" depends="check-generate" unless="generated" > <delete dir="target" /> <mkdir dir="target" /> </target> <fileset id="source-files" dir="${basedir}" includes="source" /> <target name="check-generate"> <uptodate property="generated" targetfile="target"> <srcfiles refid="source-files" /> </uptodate> </target> </project> If, in an empty directory, I do the following: - ant update-source (to generate the source file) - ant update-target (to generate the target directory) - ant update-source (to change the timestamp on the source file) - ant update-target (to generate a *new* target directory) On the second "update-target" uptodate incorrectly determines that the directory is up to date. If I modify my script to do the following: <uptodate property="generated" srcfile="source" targetfile="target" /> it will work as expected. It also works as expected if I generate a target *file* instead of a target *directory*. I've tested this now under Ant 1.6.5 and 1.6.2, and on two different Java 1.5.0 platforms. I submitted a message about the problem to the users mailing list, and got no response, so I assume this is not a problem that has been recognized previously. Dan Smith -- 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]