ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 5454] New: - uptodate task does not work correctly with absolute filenames.
Date Mon, 17 Dec 2001 11:15:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5454>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5454

uptodate task does not work correctly with absolute filenames.

           Summary: uptodate task does not work correctly with absolute
                    filenames.
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: tim.daniels@alcatel.be


The uptodate task has troubles with absolute paths. I made two versions of a 
simple buildfile which show that the behaviour of the uptodate task is 
different when using absolute versus relative filenames in the srcfiles 
construct. Both buildfiles reside in c:\ant-problem.

First the version that does not work. If a.txt is older b.txt Ant tells me 
that b.txt is nevertheless up to date.

<project name="doesNotWork" default="problem" basedir=".">

  <target name="check">
    <uptodate property="notRequired" targetfile="c:\ant-problem\b.txt">
      <srcfiles dir= "." includes="c:\ant-problem\a.txt"/>
    </uptodate>
  </target>

  <target name="problem" depends="check">
    <echo message="${notRequired}"/>
  </target>

</project>

Now the working version. If a.txt is older than b.txt then Ant correctly says 
that b.txt is outdated.

<project name="works" default="noProblem" basedir=".">

  <target name="check">
    <uptodate property="notRequired" targetfile="c:\ant-problem\b.txt">
      <srcfiles dir= "." includes="c:\ant-problem\a.txt"/>
    </uptodate>
  </target>

  <target name="noProblem" depends="check">
    <echo message="${notRequired}"/>
  </target>

</project>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message