https://issues.apache.org/bugzilla/show_bug.cgi?id=45960

           Summary: replace task failed to delete file
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]
                    r


I use an ant script to build an EAR file.

This script runs fine since years on Unix systems.
On Windows, an exception happens with the following message :

D:\DevWebSDI02\NE00P\UEDIE\bin\Z55C02.xml:325: IOException in
D:\DevWebSDI02\wlo\DWRDZ82TEI\EAR\online\Agora\z55cnxtest\WEB-INF\web.xml -
java.io.IOException:Failed to delete
D:\DevWebSDI02\wlo\DWRDZ82TEI\EAR\online\Agora\z55cnxtest\WEB-INF\web.xml while
trying to rename
D:\DevWebSDI02\wlo\DWRDZ82TEI\EAR\online\Agora\z55cnxtest\WEB-INF\rep371926229.tmp


The line 325 and followings are :
<replace file="${ear.dir}${file.separator}$..."
propertyfile="${scriptsdir}$...">
  <replacefilter token="@@@@ROLE_USER@@@@" property="ROLE_USER_${templ}" />
  <replacefilter token="@@@@AUTH_METHOD@@@@" property="AUTH_METHOD_${templ}" />
</replace>

The ant version used is Eclipse's one org.apache.ant_1.7.0.v200706080842
The same problem happens with Ant 1.7.1.

My workaround is to call System.gc() when entering in the replace method of the
file FileUtils.java

But it has an effect on speed execution.

I had also found some posts about this problem and Stefan Bodewig was talking
about relations between JVM and Windows file systems but unfortunately, I
cannot retrieve these posts.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to