I'm writing an Ant script to package a project into a WAR file. The software consists of several projects with their own source directories, libraries, etc.

The WAR task has a nested element lib which I'm currently working on. I currently have a reference of the required libs as a Path (containing several FileSets, which I use in a classpath reference. The lib, however, wants the input to be a FileSet, and it refuses a Path.

I tried converting my Path into a FileSet, but then I didn't get it to work as a classpath elsewhere.

Is there a way to convert a Path into a FileSet? I would hate to copy-paste the directories.

<path id="compile.libs">
    <fileset dir="${common.path}/lib" includes="*.jar"/>
    <fileset dir="${data.path}/lib" includes="*.jar"/>
    <fileset dir="${gui.path}/lib" includes="*.jar"/>
    <fileset dir="${gui.path}/WebContent/WEB-INF/lib" includes="*.jar"/>
</path>

...when used with <war ..><../> <lib refid="compile.libs"/> </war> leads to:

BUILD FAILED
build.xml:173: compile.libs doesn't denote a zipfileset or a fileset
Edit
Report