Documentation
Index
- Get OJB2Hbm
- Ant Task
Get OJB2Hbm
No distribution has been released
yet. You can build from cvs via the following commands:
cvs
-d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ojb2hbm login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ojb2hbm
co ojb2hbm
cd ojb2hbm
ant jar
The process is pretty quick and you
should end up with a distribution in the "dist" directory under module
root.
Ant Task
Here's a sample target definition to
demonstrate how the Ant task can be used.
<taskdef
name="ojb2hbm" classname="net.sourceforge.ojb2hbm.ant.OJB2HbmTask"
classpathref="build.classpath"/>
<property
name="hbm.staging.dir" value="${basedir}/hbm"/>
<property name="hbm.dir"
value="${basedir}/hbm"/>
<mkdir dir="${hbm.dir}"/>
<ojb2hbm
repositoryLocation="${basedir}/src/com/demandsolutions/persistence/repository.xml"
outputDirectory="${hbm.staging.dir}"/>
<copy flatten="true"
todir="${hbm.dir}">
<fileset
dir="${hbm.staging.dir}" includes="**/*.hbm.xml"/>
</copy>
<delete
dir="${hbm.staging.dir}"/>
<hbconfig
dest="${basedir}/src/hibernate.cfg.xml">
<mapping
dir="${basedir}/src" includes="com/demandsolutions/hbm/*.xml"/>
</hbconfig>