I am using the schemaexport ant task and it also cannot find the bean class files - I get error:
C:\build.xml:220: Schema text failed:
net.sf.hibernate.MappingException: persistent class
[store.model.team.Person] not found
I wish the schemaexport ant task allowed specifing the classpath.
Below is the fragment from my ant file.
Code:
<target name="exportmodeltoDB" depends="" description="exports the model to DB using Hibernate's schemaexport" unless="Hibernate.properties">
<path id="path.models">
<fileset dir="out/testmodels/team">
<include name="**/store/model/team/*.class"/>
</fileset>
</path>
<taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="path.models"/>
<schemaexport properties="Hibernate.properties"
quiet="no" text="no" drop="no" delimiter=";">
<fileset dir="out/testmodels/team">
<include name="**/store/model/team/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>