In my src folder there is another folder called data which contains data1.txt and data2.txt. The application loads a graph from these files in the initialization so I want to include these files in my final jar. I use ant to produce the jar file.
+2
A:
Example from http://ant.apache.org/manual/CoreTasks/jar.html :
<jar destfile="${dist}/lib/app.jar">
<fileset dir="${build}/classes"/>
<fileset dir="${src}/resources"/>
</jar>
So basically you would want to include the data-files in the same way as "resources" are included above.
From the documentation of the <jar>
task:
It is possible to refine the set of files that are being jarred. This can be done with the includes, includesfile, excludes, excludesfile and defaultexcludes attributes.
aioobe
2010-05-16 20:04:51