<?xml version="1.0"?>
<project name="tender" basedir="." default="codegen">
<property file="build.properties"/>
<property file="hibernate.properties"/>
<property name="name" value="tender"/>
<property name="version" value="1.0"/>
<property name="debug" value="true" />
<property name="deprecation" value="false" />
<property name="optimize" value="false" />
<property name="root" value="./../.."/>
<property name="webapp.dir" value="${root}/webapp"/>
<property name="lib.runtime.dir" value="${webapp.dir}/WEB-INF/lib"/>
<property name="src.core" value="${root}/src/core/com/bourbonmaritime/tender"/>
<path id="classpath">
<fileset dir="${lib.runtime.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${basedir}/../hibernate/hibernate-extensions-2.1.3/tools">
<include name="lib/*.jar"/>
<include name="hibernate-tools.jar"/>
</fileset>
<dirset dir="${webapp.dir}/WEB-INF/classes"></dirset>
</path>
<target name="codegen"
description="Generate Java source from the O/R mapping files"
depends="schemaexport"
>
<taskdef name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="classpath" />
<hbm2java output="${basedir}/temp">
<fileset dir="${src.core}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>
<target name="schemaexport">
<taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="classpath" />
<schemaexport
properties="hibernate.properties"
quiet="no"
text="no"
drop="no"
delimiter=";"
output="${basedir}/../sql/schema-export.sql">
<fileset dir="${src.core}">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>
</project>
Partager