« Return to Thread: Configuring hibernate3-maven-plugin

Configuring hibernate3-maven-plugin

by Ryan Stewart :: Rate this Message:

Reply to Author | View in Thread

I've read the plugin pages at:
http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/

But they're sparse at best. I get the idea that the hibernate3 maven plugin is generally supposed to be configured in the same way as the Hibernate Tools Ant task, but there's one particular thing I can't see how to do. I'm trying to convert an existing hbm2ddl ant task that looks like this:
        <hibernatetool destdir="${ddl.dir}">
            <classpath refid="java.classpath" />
            <configuration propertyfile="${hibernatetools.properties.dir}/hibernate.properties">
                <fileset refid="some.db.mappings" />
                <fileset refid="other.db.mappings" />
            </configuration>
            <hbm2ddl outputfilename="schema-gen.ddl.sql" format="true" />
            <hbm2ddl update="true" create="false" />
        </hibernatetool>

I think I can see how to set the configuration to "configuration" (as opposed to, say jdbcconfiguration) and how to specify the propertyfile. The outputfilename, format, update, and create seem to be pretty self-evident as well. I haven't been able to test them though, because I can't see how to specify to the hibernate3 maven plugin where my mapping files are. Any clues? Is there a way to do it similar to the fileset approach in the Ant task above, or am I going to have to create a hibernate.cfg.xml? I don't have one of those because the Hibernate config is handled by Spring. Even that hibernate.properties file referenced by the Ant task is generated by the build itself. There is no Hibernate-related configuration outside of Spring.

 « Return to Thread: Configuring hibernate3-maven-plugin