Did you set the maven.hibernate.output.file? Are you using xdoclet? Also you have to worry about maven.hibernate.text=yes .
I found that I couldn't do it either, there's something wrong with the hibernate plugin, I never could figure out what. It could never find my hibernate.properties file, whether I referred to it in the jar, absolute directory .... Finally I just loaded those values with a <loadproperties srcFile=""> The SchemaExport.addJar also does not work (look at the Hibernate API) I'm also beginning to suspect the hibernate developers do there development on windows only, and port over to linux. the SchemaExport.bat doesn't transfer over to a SchemaExport.sh very well, the classpathing really bites it. I pretty much just stole the ant/jelly code from the plugin myself and did it this way: <goal name="createdb:taskdef"> <ant:path id="project.classpath"> <ant:path refid="maven.dependency.classpath"/> <ant:pathelement path="${maven.build.dest}"/> <ant:pathelement path="${basedir}/hibernate.properties"/> </ant:path> <ant:taskdef name="schemaexport" classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask" classpathref="project.classpath" /> </goal> I separated it out in case I want to write a createdb:update task later: <goal name="createdb:export" prereqs="createdb:taskdef,jar:jar"> <loadproperties srcFile="${basedir}/hibernate.properties"/> <ant:mkdir dir="${maven.hibernate.output.dir}"/> <j:set var="hibernate.connection.datasource" value=""/> <schemaexport properties="${maven.build.dest}/hibernate/hibernate.properties" quiet="yes" text="no" drop="no" delimiter=";" format="yes" output="${maven.hibernate.output.file}"> <fileset dir="${maven.build.dest}"> <include name="**/*.hbm.xml"/> </fileset> </schemaexport> </goal> Be sure you have some kind of postGoal for hibernate that copies the *.hbm.xml files into the directory where your classes have been compiled. ----- Original Message ----- From: "Daniel Massie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 24, 2003 12:14 AM Subject: hibernate > I have goals set up to generate my hibernate mapping files, but I am > unable to actually use these to create a database. How can I achieve > this using maven? When I use the goal 'hibernate:schema-export' it > builds successfully, but no schema is produced. > Any help is much appreciated. > Thanks > Daniel > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]