I have a text file (let's say textfile.txt
) stored in the project folder in Netbeans 7.3, e.g.
project folder
textfile.txt
src
package
package.subpackage
MyClass.java
When I compile I get a dist
folder where the jar file is put in, e.g.
project folder
textfile.txt
dist
MyProject.jar
src
package
package.subpackage
MyClass.java
How can I edit the build.xml
file to make the file textfile.txt
being copied under dist
folder?
Edit the "-post-compile" target inside the build.xml
as follows:
<target name="-post-compile">
<copy file="textfile.txt" todir="${dist.dir}"/>
</target>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With