I know there should be a way to copy a jar file to another location once Apache Ant finish the compilation. I am using NetBeans 7 and it creates its own build.xml file, like this one:
<project name="ccabstract" default="default" basedir="." xmlns:ejbjarproject="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
<description>Builds, tests, and runs the project ccabstract.</description>
<import file="nbproject/build-impl.xml"/>
</project>
So, what code should I insert here, so Ant after finishing the compilation then copy the compiled (myfile.jar) to another folder (../myfolder/). What I wantwith this is to create a common folder where all projects copy their distributable files in it, and that folder is never cleaned, the files in there should be only replaced.
Thanks.-
I don’t know about Netbeans, but from what it looks like, all Netbeand Ant code is in the included file. You can use an Ant copy command to do the file copy. Like this:
Please see Ant manual for details.