Ant's record task use current user dir to get the true file path. While not use the project's base dir to get the true file path. This is my test build xml file under "d:\MyProject" <project name="MyProject" default="test" basedir="."> <target name="test"> <delete dir="logs" /> <mkdir dir="logs"/> <record name="logs/log.txt" action="start" /> <record name="logs/log.txt" action="stop" /> </target> </project> When run ant use "cd d:\ ; ant -buildfile d:\MyProject\build.xml", it could delete and create "logs" dir under "MyProject" successfully. But it report error and want to build a log file at "d:\logs". This cause the ant build file's failure even when using ANT API and in eclipse IDE.
Confirmed with actual cvs head (1.7alpha) on Win2K, JDK 1.4.2. Recorder.setName() takes a String as argument not a File. Therefore the relative name is kept here. Recorder.getRecorder() uses that name as argument for getting one from its hashtable or creating a new one. After creating the output stream is set by >>new PrintStream(new FileOutputStream(name))<<. I try some modifications.
*** This bug has been marked as a duplicate of 17781 ***
Certainly not a Blocker (simply use name="${basedir}/..." as a workaround). Changing the interpretation of the name attribute would break backwards compatibility.