This is a cross-post, please forgive.
Okay, I finally got it to work, and I think the reason it wasn't working is pretty crappy.
My task was defined as such. Before, I was trying to define classpaths within the task using filesets, but nothing worked. So, because everyone else was doing it, I switched to using the "classpathred" attribute in the taskdef element.
Code:
<target name="db-schema" description="Generates a DB schema file from the hibernate class mapping files.">
<taskdef name="schemaexport" classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="project.class.path">
</taskdef>
<schemaexport properties="${build.classes.dir}/hibernate.properties" delimiter=";"
drop="false" output="schema.sql" quiet="false" text="true">
<fileset dir="${build.classes.dir}">
<include name="**/*.hbm.xml" />
</fileset>
</schemaexport>
</target>
Before, when things were not working, my path definition looked like this. It found the jar files wonderfully, but not the classes or the properties file.
Code:
<path id="project.class.path">
<fileset dir="${build.classes.dir}">
<include name="**/*.class" />
<include name="hibernate.properties" />
</fileset>
<fileset dir="/dev/games/lib">
<include name="hibernate2.jar" />
<include name="commons-logging.jar" />
<include name="commons-collections-3.1.jar" />
</fileset>
<fileset dir="/dev/games/lib/build">
<include name="dom4j-1.5.jar" />
</fileset>
</path>
When a "pathelement" variable was added to the path, everything works dandy now.
Code:
<path id="project.class.path">
<pathelement location="${build.classes.dir}"/>
<fileset dir="/dev/games/lib">
<include name="hibernate2.jar" />
<include name="commons-logging.jar" />
<include name="commons-collections-3.1.jar" />
</fileset>
<fileset dir="/dev/games/lib/build">
<include name="dom4j-1.5.jar" />
</fileset>
</path>
And I feel strangely... unsatisfied.
Lukas