PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3568 *** shadow/3568 Wed Sep 12 08:17:24 2001 --- shadow/3568.tmp.18050 Wed Sep 12 08:17:24 2001 *************** *** 0 **** --- 1,82 ---- + +============================================================================+ + | uptodate task assumes mapper "to" path is relative to srcfiles directory | + +----------------------------------------------------------------------------+ + | Bug #: 3568 Product: Ant | + | Status: NEW Version: 1.4 | + | Resolution: Platform: PC | + | Severity: Major OS/Version: Other | + | Priority: Other Component: Core tasks | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + The uptodate task now assumes that the path specified by the mapper + "to" attribute is relative to the uptodate "srcfiles" attribute. This + bug has been introduced in version 1.4, 1.3 did not have this + problem. This makes it impossible to use an absolute path for the + mapper "to" attribute. A workaround may be possible by specifying the + path for the "to" attribute in terms of the "srcfiles" attribute path. + This workaround would be non-elegant to put it mildly. + + In order to reproduce the problem, copy the build.xml file (below) to + a temporary directory (I used c:\tmp). Then create 2 files in the temp + directory (uptodateTest.src, uptodateTest.mapto). + Then run 'ant -version'. + + Below is a short build.xml file followed by a transcript of how I + reproduced the problem. My shell environment is Cygwin under NT, but + is should be easy enough to reproduce under any environment. + + The code containing the bug is in the scanDir method (line 185) in + org.apache.tools.ant.taskdefs.UpToDate.java + + -- mike g. + + <!-- begin build.xml --> + + <project name="mapper-test" default="uptodateTest"> + + <property name="tmp" value="c:/tmp"/> + + <target name="uptodateTest"> + <uptodate property="isUpToDate"> + <srcfiles dir="${tmp}" includes="uptodateTest.src"/> + <mapper type="merge" to="${tmp}/uptodateTest.mapto"/> + </uptodate> + <echo message="isUpToDate = ${isUpToDate}"/> + </target> + + </project> + + <!-- begin end.xml --> + + <!-- begin transcript of how to reproduce --> + + % pwd + /tmp + % touch uptodateTest.src + % touch uptodateTest.mapto + % cp ~/ant/build.xml . + % ant -verbose + Ant version 1.4 compiled on September 3 2001 + Buildfile: build.xml + Detected Java version: 1.2 in: c:\jdk1.2.2\jre + Detected OS: Windows NT + parsing buildfile c:\tmp\build.xml with URI = file:c:/tmp/build.xml + Project base dir set to: C:\tmp + Build sequence for target `uptodateTest' is [uptodateTest] + Complete build sequence is [uptodateTest] + + uptodateTest: + [uptodate] uptodateTest.src added as C:\tmp\c:\tmp\uptodateTest.mapto doesn't e + xist. + Property ${isUpToDate} has not been set + [echo] isUpToDate = ${isUpToDate} + + BUILD SUCCESSFUL + + <!-- end transcript of how to reproduce -->
