Here's some sample code you can use in your Ant build scripts to add all the jar files in a directory tree (typically your lib directory) to define a classpath for your Ant build/compile task:
lib