You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Thomas Haas <th...@softwired-inc.com> on 2000/03/22 20:53:07 UTC
PATCH: Rename task
Dear committers
Some time ago I implemented a rename task. It still has not be applied
with no apparent reason.
Attached please find a patch implementing the task and a patch to
docs/index.html documenting the task.
Can someone please commit the patches or tell me what is missing.
Thank you.
- tom
Test:
rename.xml:
<?xml version="1.0"?>
<project name="RenameTest" default="main" basedir=".">
<target name="main">
<rename src="foo1.jar" dest="bar1.jar" />
<rename src="foo2.jar" dest="bar2.jar" replace="off" />
</target>
</project>
$ touch foo1.jar foo2.jar bar1.jar bar2.jar
$ ant -buildfile rename.xml
Fails, because bar2.jar already exists.
$ ant -buildfile rename.xml
Fails, because foo1.jar does not exist anymore
$ touch foo1.jar foo2.jar bar1.jar bar2.jar; rm bar2.jar
$ ant -buildfile rename.xml
Succeess.