Netbeans: move a text file into dist folder when c

2019-04-09 12:16发布

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?

1条回答
地球回转人心会变
2楼-- · 2019-04-09 12:43

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

<target name="-post-compile">
    <copy file="textfile.txt" todir="${dist.dir}"/>        
</target>
查看更多
登录 后发表回答