Hibernate version: 2.1.6
Hi All,
I've a little problem using schemareport with ANT :
Error : csc.foo.bean.Employee.hbm.xml not found
Ant Code :
Code:
<path id="project.classpath">
<fileset dir="${project.lib}">
<include name="*.jar"/>
</fileset>
<fileset dir="${tomcat.home}/common/lib">
<include name="servlet*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="hibernate.schema.export" description="Generates Hibernate schema" >
<taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="project.classpath" >
</taskdef>
<schemaexport output="schema-export.sql"
config="${build.dir}/hibernate.cfg.xml" >
<fileset dir="${build.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>
hibernate.cfg.xmlCode:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">java:comp/env/jdbc/fostisweb</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<mapping resource="csc.fostis.bean.Employee.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Directories structure:
src -> sources dir
exploded/WEB-INF/classes -> build dir (hibernate.cfg.xml is also there)
The mapping file Employee.hbm.xml is with the class file Employee.class in package
csc.fostis.bean
Can someone help me ?
If you need other info, please ask me.
Thank you very much
NiGhMa