Please read the reply of Stefan Bodewig, who states that this is an Windows issue. You won't see it on Linux.
R. -----Original Message----- From: Ivan Ivanov [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 2. Dezember 2004 09:39 To: Ant Users List Subject: RE: Release log file lock from <record> Well, I tried it with <replace> too. Still working: <project> <record name="log.txt" action="start" append="yes"/> <echo message="test inside record"/> <record name="log.txt" action="stop"/> <echo message="test outside record"/> <copy file="log.txt" tofile="test.txt"/> <replace file="log.txt" token="test" value="test2"/> <replace file="test.txt" token="test" value="test1"/> </project> What bothers is that you are getting error in deleting. From the snippet I do not decipher where is line 190 :)), but if you are using <delete> task try setting it failonerror attribute to true. Also there have been some posts in the list if the file is opened by another program on Windows (say Windows Explorer), due to windows file locks, ant cannot delete it (I never test that anyway). --- Robert Soesemann <[EMAIL PROTECTED]> wrote: > Here is a snippet of my code. Maybe its because I am > not only moving it, > but also changing its content. > > I'm getting the error: > ---------------------- > BUILD FAILED: D:\...\build.xml:190: IOException in D:\..\log.tmp - > java.io.IOException:Failed to delete D:\..\log.tmp > while trying to > rename D:\..\rep2008241113.tmp > > Snippet: > -------- > <!-- ================ Target 5: Validate > Attributes ================ > --> > <target name="5_ValidateAttributes" depends="4_ValidateRelations"> > > <echo message="${br}5 Validate files" file="${abs-logfile}" > level="info" append="yes"/> > <record name="${abs-logfile}" action="start" > loglevel="error" > append="yes" /> > > <xslt basedir="${kiwi-rel_dir}" > destdir="${plain_dir}" > ... > </xslt> > > <record name="${abs-logfile}" action="stop"/> > </target> > > <target name="FullProcess" > depends="6_KIWI2VignetteXML" > description="Finalize complete migration process"> > <copy file="${logfile}" tofile="log.txt"/> > <replace file="log.txt" token="/" value="\"/> > <replace file="log.txt" > token="${basedir}\${tmp_dir}\" > value=""/> > </target> > > Any ideas? > -----Original Message----- > From: Ivan Ivanov > [mailto:[EMAIL PROTECTED] > Sent: Donnerstag, 2. Dezember 2004 08:49 > To: Ant Users List > Subject: Re: Release log file lock from <record> > > > The follwoinf script works in my environment (Fedora > Core 2 Linux): > <project> > <record name="log.txt" action="start"/> > <echo message="test inside record"/> > <record name="log.txt" action="stop"/> > <echo message="test outside record"/> > <move file="log.txt" tofile="test.txt"/> > </project> > > Ivan > > --- Robert Soesemann <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > In my build script I use the <record> task to echo > > errors to a log file. > > At the end of my script i want to perform some > > operations (replace, > > rename) on that file. > > > > But this does not work, as ant hold a lock on that > > file the whole time. > > How can I release that? > > > > Regards, > > > > R. > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > __________________________________ > Do you Yahoo!? > All your favorites on one personal page - Try My > Yahoo! > http://my.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]