I'm using the following ant task to accomplish this:
<fileset id="hibernate.mapping.files" dir="${build.dir}/ejb/gen">
<include name="**/*.hbm.xml" />
</fileset>
<!--
=================================================================== -->
<!-- The "initdb" target generates the database schema and creates
-->
<!-- tables based on the mapping files
-->
<!--
=================================================================== -->
<target name="initdb" depends="clean,package-ejb"
description="creates database tables">
<pathconvert refid="hibernate.mapping.files"
property="hibernate.mappings" pathsep=" "/>
<java classname="cirrus.hibernate.tools.SchemaExport"
fork="true">
<arg line="${hibernate.mappings}"/>
<jvmarg value="-Dhibernate.dialect=${hibernate.dialect}"/>
<jvmarg
value="-Dhibernate.connection.driver_class=${hibernate.connection.driver
_class}"/>
<jvmarg
value="-Dhibernate.connection.url=${hibernate.connection.url}"/>
<jvmarg
value="-Dhibernate.connection.username=${hibernate.connection.username}"
/>
<jvmarg
value="-Dhibernate.connection.password=${hibernate.connection.password}"
/>
<classpath refid="xdoclet.classpath" />
<classpath refid="hibernate.classpath" />
</java>
</target>
HTH,
Matt
> -----Original Message-----
> From: hib...@li...
> [mailto:hib...@li...] On
> Behalf Of Konstantin Priblouda
> Sent: Tuesday, December 17, 2002 6:49 AM
> To: hibernate-devel
> Subject: [Hibernate] ant subtask for schema generation?
>
>
> Hi all,
> current toolset is not very convenient.
> Only .bat scripts, and they require
> customisations to be usable.
>
> what about ant task to generate DB schema?
> Is there already one?
>
> regards,
>
> =====
> Konstantin Priblouda ( ko5tik ) Freelance Software developer
> < http://www.pribluda.de > < play java games ->
http://www.yook.de > < render charts online ->
http://www.pribluda.de/povray/ >
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
hibernate-devel mailing list hib...@li...
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
|