Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

including a file in a build

 
Mario Bonassin
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to include a file into a build that can then be read by the program. Here is my build.xml

and here is the code thay should be able to read a file called 'HELP'

When i compile normally it sees the file fine but how do I include it in the jar.
Thanks
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mario,
You can include nested filesets in the jar task to include your "HELP" file as part of your JAR.
 
Mario Bonassin
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried include, includes, and includesfile and none seemed to work. I assume that they are supposed to be withing the <jar> section right? I don't know what I'm doing wrong.
Mario
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mario,
It should show up in your JAR if you do it correctly. I don't know what happens when you specify the basedir and have nested filesets. I would try just nested filesets for you.

See how that goes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic