Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans: move a text file into dist folder when compiling

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?

like image 853
mat_boy Avatar asked May 03 '13 10:05

mat_boy


1 Answers

Edit the "-post-compile" target inside the build.xml as follows:

<target name="-post-compile">
    <copy file="textfile.txt" todir="${dist.dir}"/>        
</target>
like image 199
JeanValjean Avatar answered Sep 28 '22 01:09

JeanValjean