I am in the process of packaging my java application into a jar file. I am using ant and eclipse. I need to actually include in the jar a couple of separate, non-code files
You shouldn't have an includesfile
attribute in a target to start with, and I suspect you've misunderstood the point of it anyway - the idea is that the file you specify with includesfile
contains patterns for which files to include, if you don't want to put them into your Ant file.
It strikes me that all you need is an extra fileset containing the appropriate files you need. For example, for readthis.txt
:
I would also suggest that you create a new directory for the resources, so you can do:
with no hassle. This will also keep your directory structure cleaner, making it easier to find things from the top downwards.