Hi laurent4x,
To generate a schema.ddl file use org.hibernate.tool.ant.HibernateToolTask and hbm2ddl.
Personally I use an ant task to do this, my task looks like this -
Code:
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"/>
<!-- Create SQL DDL statements and writes them to a file -->
<target name="exportSchemaToFile">
<hibernatetool destdir="${build.dir}">
<!--// Note : don't have to name the persistence unit
// if only one persistence.xml on the path -->
<jpaconfiguration persistenceunit="xxxapp"/>
<classpath>
<!-- In this classpath you put your classes dir,
and/or jpa persistence jar -->
<path location="${build.classes.dir}"/>
</classpath>
<hbm2ddl export="false" outputfilename="sql/schema.ddl"/>
</hibernatetool>
</target>
There is documentation on this website for hbm2ddl (somewhere).
Forget about persistence.xml in this case - this file isn't anything to do with schema generation.
However, in case you still need to know what can go in this file, the XML schema is specified in the EJB 3.0 specification (in the persistence part) available from jcp.org.
Andy.