[HIBERNATE 3.0] Problème avec schemaexport
Bonjour à tous,
Voila j'ai déjà eu l'occasion d'utiliser les schemaexport d'Hibernate 2.x avec ant.
Désormais je travaille avec Hibernate 3.0 et la génération me pose un problème voici ma config (j'ai supprime des choses pour que cela soit plus clair) :wink:
Voici l'arborescence Hibernate du projet
Code:
1 2 3 4 5 6
|
src
|----com.toto.projectname.conf.hibernate
|----hibernate.cfg.xml
|----mapping
|--dimension.hbm.xml |
Hibernate config
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">java:comp/env/projectname</property>
<property name="show_sql">false</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<!-- Mapping files -->
<mapping resource="mapping/dimension.hbm.xml"/>
</session-factory>
</hibernate-configuration> |
Target ant
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
<target name="schemaexport" depends="compile">
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="class.path"/>
<schemaexport
config="com.toto.projectname.conf.hibernate/hibernate.cfg.xml"
quiet="no"
text="no"
drop="no"
delimiter=";"
output="schema-export.sql">
</schemaexport>
</target> |
Je lance le schemaexport via la commande
Et l'erreur retournée c'est "impossible de trouver le ficher mapping/dimension.hbm.xml"
Je faisais la même chose sous Hibernate 2 et ca passait, je ne dois pas avoir les yeux en face des trous
Si quelqu'un peut m'aider...
Merci d'avance