[Help] Bug-replaceregexp-running ANT in background

SourceForge.net <[email protected]> Sun, 26 Feb 2012 12:58:49 -0800
Newsgroups gmane.comp.java.ant-contrib.devel
Message-ID <[email protected]>
The following forum message was posted by gw1500se at http://sourceforge.net/projects/ant-contrib/forums/forum/113701/topic/5069152:

I believe I have found a bug in replaceregexp when it is used in a build file
and run in background. I've searched for this particular error but nothing seems
to address what is happening to me. I have a build file that works perfectly
from the command line. However, if I run the build in background (i.e. no console)
I get the error:

BUILD FAILED
/var/www/html/Applets/KCBSEvents/makejar.xml:39: Couldn't rename temporary file
/tmp/replace8780274197734535594.txt
	at org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.doReplace(ReplaceRegExp
.java:480)
	at org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.execute(ReplaceRegExp.j
ava:520)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.Main.runBuild(Main.java:809)
	at org.apache.tools.ant.Main.startAnt(Main.java:217)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: Failed to delete
/var/www/html/Applets/KCBSEvents/src/KCBSEvents/resource/build.properties while
trying to rename /tmp/replace8780274197734535594.txt
	at org.apache.tools.ant.util.FileUtils.rename(FileUtils.java:1307)
	at org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.doReplace(ReplaceRegExp
.java:474)

I found a similar problem on bugzilla but it has been around a long time with
no activity other than a recent update by me. However, at the time I thought
it was an ANT problem but looking at the trace it seems specific to replaceregexp.
Am I the only one that has encountered this and if not, is there a workaround?
TIA.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/