To simplify access, I have several configuration files in the parent row of the project folders. When creating projects, they must be copied to one of the source folders of the projects before the assembly is completed, after which I want them to be deleted. At the moment, I have the following:
<target name="build-java"> <copy file="config.properties" todir="project/src" /> <delete file="project/src/config.properties" /> </target>
What kind of work the project does. Alas, for my pride, they are not always. Ideally, I would like to get the equivalent of the following Java:
File src = new File("config.properties"); File dst = FileUtils.copyFile(src, "project/src"); dst.deleteOnExit();
But neither Copy nor Delete ant tasks seem suitable for work. Doesn't this seem like a particularly obscure need?
source share